JavaScript中清空数组的三种方式 方式1,splice var ary = [1,2,3,4]; ary splice(0,ary length); console log(ary); 输出 [],空 JavaScript 2022-04-09 228 点赞 3 评论 345 浏览