当前位置 博文首页 > hibiscusxin的博客:不用循环判断某个元素是否在数组中
比如判断3是否存在arr中
var arr = [1,2,3,4,5,6] arr.some(str => str === 3) // true