PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

How to remove specific element from JavaScript array?

Firstly find the index of the element you want to remove:

Note: browser support for indexOf is limited, it is not supported in IE7-8.

Then remove element using its index and function 'splice':

The second parameter of splice is the number of elements to remove.

Note: splice modifies the array in place and returns a new array containing the elements that have been removed.

 

WOOBE - WooCommerce Bulk Editor and Products Manager Professional