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 objects       Âin 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 objects       Âin 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:
 


 
                                     








