/ Published in: JavaScript

Simply pass in array name and the value of the item you want to remove
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function removeByElement(arrayName,arrayElement) { for(var i=0; i<arrayName.length;i++ ) { if(arrayName[i]==arrayElement) arrayName.splice(i,1); } }
Comments
