这段代码用了一个非常巧妙的方法清空数组
var myArray = ["one", "two", "three"]; // console.log( myArray ) => ["one", "two", "three"] myArray.length = 0; // console.log( myArray ) => []
这段代码用了一个非常巧妙的方法清空数组
var myArray = ["one", "two", "three"]; // console.log( myArray ) => ["one", "two", "three"] myArray.length = 0; // console.log( myArray ) => []