标签:size class 判断 两种 16px dex index let tle
1.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.indexOf (‘4‘));//-1
标签:size class 判断 两种 16px dex index let tle
原文地址:https://www.cnblogs.com/shine1234/p/14817544.html