Common methods of JS

Contains string indexOf ()! =-1

if(Ids.indexOf(node.id)!=-1){  //Contain
    node.check = true;   //Handle
}

Array size

arr.length;

 

Leave a Reply

Your email address will not be published. Required fields are marked *