1function arrayRemove(arr, value)
2{
3 return arr.filter(function(ele){
4 return ele != value;
5 });
6}
7//var result = arrayRemove(array, 6);// result = [1, 2, 3, 4, 5, 7, 8, 9, 0]
1
2
3 var ar = [1, 2, 3, 4, 5, 6];
4
5 ar.pop(); // returns 6
6 console.log( ar ); // [1, 2, 3, 4, 5]
7
8 ar.shift(); // returns 1
9 console.log( ar ); // [2, 3, 4, 5, 6]
10
11
12 for ( var i = 0; i < ar.length; i++){
13 if (ar[i] === 2 /*Value u wont to remove*/)
14 ar.splice(i, 1);
15 }
16 console.log( ar ); // [1, 3, 4, 5, 6]
17
18
19
1<div id="div-01">Here is div-01</div>
2<div id="div-02">Here is div-02</div>
3<div id="div-03">Here is div-03</div>
4