diff --git a/04_removeFromArray/removeFromArray.js b/04_removeFromArray/removeFromArray.js index 5d7d6de..b3b2692 100644 --- a/04_removeFromArray/removeFromArray.js +++ b/04_removeFromArray/removeFromArray.js @@ -1,6 +1,6 @@ const removeFromArray = function(array, ...remove) { remove.forEach(element => { - let findIndexElement = array.findIndex(x => x == element); + let findIndexElement = array.findIndex(x => x === element); if (findIndexElement >= 0) { let saveArray = []; for (let i = 0, arrayLength = array.length; i < arrayLength - findIndexElement - 1; i++) { diff --git a/04_removeFromArray/removeFromArray.spec.js b/04_removeFromArray/removeFromArray.spec.js index 745a20f..c17239a 100644 --- a/04_removeFromArray/removeFromArray.spec.js +++ b/04_removeFromArray/removeFromArray.spec.js @@ -19,7 +19,7 @@ describe('removeFromArray', () => { test('works with strings', () => { expect(removeFromArray(["hey", 2, 3, "ho"], "hey", 3)).toEqual([2, "ho"]); }); - test.skip('only removes same type', () => { + test('only removes same type', () => { expect(removeFromArray([1, 2, 3], "1", 3)).toEqual([1, 2]); }); });