判断数组在工作中十分常见,一般掌握前三种写法足以。
1. Array.prototype.isArray使用原型方法
const arr = [1, 2, 3, 4];
console.log(Array.isArray(arr));
2.
2021-06-01