lcgyh / myDocs

0 stars 0 forks source link

js数组常用操作 #10

Open lcgyh opened 7 years ago

lcgyh commented 7 years ago

js数组常用的操作

lcgyh commented 7 years ago

js数组API

lcgyh commented 7 years ago
//js判断元素是否在数组中
    isInArray=(arr,value)=>{
        for(var i = 0; i < arr.length; i++){
        if(value == arr[i]){
            return true;
        }
    }
    return false;
    }
lcgyh commented 7 years ago

删除数组元素