伪数组一般具有以下特点:
1、按索引方式存储数据;
2、具有length属性;
3、没有数组的push、shift、pop等方法;
不方便操作
三种方法
let arr = Array.from(arguments)
let arr = Array.prototype.slice.call(arguments);
let arr = [].slice.call(arguments)
function fn() {
// let arr = Array.from(arguments)
// let arr = Array.prototype.slice.call(arguments);
let arr = [].slice.call(arguments)
console.log(arr,arg instanceof Array);
}