Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better arrayAnswers.remove test data
Ensure that method works correctly on an array with two of the same value in a row. For example, this method will pass the test in its current form, but contains a flaw that is revealed when the test data includes two identical values in a row: for(var i = 0; i < arr.length; i++) { if(arr[i] === item) { arr.splice(i, 1); } } return arr; By removing arr[i] AND incrementing the index, the loop effectively tests only every other array item, and will not remove all instances of the tested value. [close rmurphey#185]
- Loading branch information