How to remove specific value from array using jQuery ?

Given an array elements and the task is to remove the specific value element from the array with the help of JQuery. There are two approaches that are discussed below:
Approach 1: We can use the not() method which removes the element that we want. Later, use get() method to get the rest of the elements from the array.
- 
Example: 
<!DOCTYPE HTML><html><head><title>Remove certain property for all objectsin array with JavaScript.</title><scriptsrc=</script></head><bodystyle="text-align:center;"><h1style="color: green">GeeksForGeeks</h1><pid="GFG_UP"></p><buttononclick="gfg_Run()">Click Here</button><pid="GFG_DOWN"style="color:green;"></p><script>var el_up = document.getElementById("GFG_UP");var el_down = document.getElementById("GFG_DOWN");var arr = ["GFG", "GeeksForGeeks", "Geek", "Geeks"];var remEl = "Geek";el_up.innerHTML = "Click on the button to perform "+ "the operation.<br>Array - [" + arr + "]";function gfg_Run() {var arr2 = $(arr).not([remEl]).get();el_down.innerHTML = "[" + arr2 + "]";}</script></body></html>
- 
Output:
 
Approach 2: We can use the inArray() method to get the index of the element (that is to be removed) and then use slice() method to get the rest of the elements.
- 
Example: 
<!DOCTYPE HTML><html><head><title>Remove certain property for all objectsin array with JavaScript.</title><scriptsrc=</script></head><bodystyle="text-align:center;"><h1style="color: green">GeeksForGeeks</h1><pid="GFG_UP"></p><buttononclick="gfg_Run()">Click Here</button><pid="GFG_DOWN"style="color:green;"></p><script>var el_up = document.getElementById("GFG_UP");var el_down = document.getElementById("GFG_DOWN");var arr = ["GFG", "GeeksForGeeks", "Geek", "Geeks"];var remEl = "Geek";el_up.innerHTML = "Click on the button to perform "+ "the operation.<br>Array - [" + arr + "]";function gfg_Run() {arr.splice($.inArray(remEl, arr), 1);el_down.innerHTML = "[" + arr + "]";}</script></body></html>
- 
Output:
 
 
				 
					 



