摘要: es7 1 Array.prototype.includes 之前都是使用indexOf判断,没有返回-1,现在includes更加方便 Includes 方法用来检测数组中是否包含某个元素,返回boolean值 let arr = [1, 2, 3, 4, 5]; arr.includes(1); 阅读全文
posted @ 2020-10-25 00:46 张_Ning 阅读(295) 评论(0) 推荐(0) 编辑