This commit is contained in:
Mohammed Nabeel 2020-07-15 18:55:38 +03:00
parent 1987591d9f
commit f2ff635fcf
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ const removeFromArray = function(...args) {
// Remove all the remaining elements from the array
for (let i = 1; i < args.length; i++) {
pos = myArray.indexOf(args[i]);
if (pos >= 0 && myArray[pos] === args[i]) { //Is it a valid argument
if (pos >= 0 && myArray[pos] === args[i]) { //Check argument and type
myArray.splice(pos, 1);
}
}