Learn With Santosh
Home
Resources
Tools
Dev Encyclopedia
Tutorials
Games
Code Snippets
Interview QA
Quiz
Blogs
Home
>
Javascript
>
Javascript: How to remove specifice array by key
Javascript: How to remove specifice array by key
Posted on January 29, 2017 by
Santosh Shelar
Function to remove specific array by key
function removeExistingRecords(key) {
try {
for (var i = arr.length - 1; i >= 0; i--) {
if (arr[i][0] == key) {
arr.splice(i, 1);
}
}
} catch (e) { }
}
Tagged:
Javascript
No comments:
Post a Comment
Newer Post
Older Post
Home
No comments:
Post a Comment