JavaScript中清空数组的三种方法分享 方式1,splice 复制代码 代码如下: var ary = [1,2,3,4]; ary splice(0,ary length); console log(ary); JavaScript 2022-04-10 121 点赞 1 评论 183 浏览