I have an array like treeids = ['a','b','c','d'];
I want to remove the ‘b’ element. By Using index we can do, but i want this with out using index, because those values comes dynamically into this array.
Just remove with the name only.
It should support in IE7 browser.
How to do this.
Thanks
JavaScript 1.6 provides Array.filter, which would suit your needs spot on.
Of course, as you can see from the Browser support table at the bottom, if you must support IE older then IE 9, you’re out of luck.
jQuery provides jQuery.grep which does the same thing, but introduces the overhead of a separate library.
Underscore.js has _.filter, but again, this would be using a separate library for only one purpose.