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