Created
June 27, 2020 06:26
-
-
Save luislobo14rap/8aaaccab9370ed3aefb002ca4a4ad5e8 to your computer and use it in GitHub Desktop.
remove-of-array.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// remove-of-array.js v1 | |
function removeOfArray(array_, item) { | |
while (array_.indexOf(item) > -1) { | |
let i = array_.indexOf(item); | |
if (i > -1) { | |
array_.splice(i, 1); | |
}; | |
}; | |
return array_; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment