/ Published in: JavaScript
Simply pass in array name and the value of the item you want to remove
Expand |
Embed | Plain Text
function removeByElement(arrayName,arrayElement) { for(var i=0; i<arrayName.length;i++ ) { if(arrayName[i]==arrayElement) arrayName.splice(i,1); } }
You need to login to post a comment.
