Closed Vinnu1 closed 6 years ago
That sounds great!
function removeElementFromArray(arr, re) { let index = arr.indexOf(re); if( index > -1 ){ arr.splice(index, 1); return arr; } else{ return arr; } }
This is what I have in mind, feels okay?
Looks great!
I would like to submit a function which checks if an element exists in array and if so, remove it and return the rest.