摘要: [1, 2, 3].includes(2); // true [1, 2, 3].includes(4); // false [1, 2, NaN].includes(NaN); // true没有该方法之前,我们通常使用数组的indexOf方法,检查是否包含某个值。 if (arr.indexOf 阅读全文
posted @ 2020-06-10 11:10 杨煊煊 阅读(1338) 评论(0) 推荐(1) 编辑