1. 使用数组的slice()方法
var arr1 = Array.prototype.slice.call(fadeArray); var arr2 = Array.prototype.slice.apply(this, [fadeArray]);
2.使用ES6中Array.from方法
Array.from('foo');
// ["f", "o", "o"]
const bar = ["a", "b", "c"];
Array.from(bar);
// ["a", "b", "c"]
浙公网安备 33010602011771号