将类数组对象转化为数组对象的方法

134 阅读1分钟

方法一

const arr = Array.prototype.slice.call(arguments);

方法二

const arr = Array.from(arguments);