js 判断一个元素是否在数组中
摘要:
(1).let arr = [1,2,3]; arr.includes(1) // true arr.includes(5) //false (2).a=["1", "3", "2", "3", "0"]; console.log(a.indexOf ('3'));//1 console.log(a 阅读全文
posted @ 2022-04-27 10:16 paike123 阅读(43) 评论(0) 推荐(0) 编辑