伪数组,当一个对象具有以下特点:
1、可以使用索引对数据进行操作;
2、具有length(长度)属性;
3、但是不能使用数组的方法,如push,pop等。
如何将伪数组转成真正的数组??
1、🧡利用ES6提供的Array的from方法🧡
var handleArrows2 = function(){
console.log("arguments",arguments)
console.log(Array.from(arguments))
}
handleArrows2(1,2,3)