var arr = [1, 2, 3, 4];
arr.splice(0, arr.length);
console.log(arr);=》[]
转载于:https://www.cnblogs.com/chuxinsyn/p/7903241.html
var arr = [1, 2, 3, 4];
arr.splice(0, arr.length);
console.log(arr);=》[]
转载于:https://www.cnblogs.com/chuxinsyn/p/7903241.html