摘要: 1. 使用 Array.isArray() 方法,推荐 let arr = [1,2,3,4] console.log(Array.isArray(arr)) // true 2. 使用 Object.prototype.toString.call() 方法,该方法不仅能判断数组,还能判断 func 阅读全文
posted @ 2022-11-17 18:47 cros 阅读(156) 评论(0) 推荐(0)