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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| GOAL: Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ | |
| // EXAMPLE TEST: | |
| // destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1] | |
| function destroyer(arr) { | |
| // STEP 1: Access other arguments with arguments obj |
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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| GOAL: Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ | |
| // EXAMPLE TEST: | |
| // destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1] | |
| function destroyer(arr) { | |
| // STEP 1: Access other arguments with arguments obj |
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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| GOAL: Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ | |
| // EXAMPLE TEST: | |
| // destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1] | |
| function destroyer(arr) { | |
| // STEP 1: Access other arguments with arguments obj |
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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| GOAL: Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ | |
| // EXAMPLE TEST: | |
| // destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1] | |
| function destroyer(arr) { | |
| // STEP 1: Access other arguments with arguments obj |
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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| GOAL: Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ | |
| // EXAMPLE TEST: | |
| // destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1] | |
| function destroyer(arr) { | |
| // STEP 1: Access other stuf with arguments obj |
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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| GOAL: Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ | |
| // EXAMPLE TEST: | |
| // destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1] | |
| function destroyer(arr) { | |
| // STEP 1: Access other stuf with arguments obj |
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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| GOAL: Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ | |
| // EXAMPLE TEST: | |
| // destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1] | |
| function destroyer(arr) { | |
| // STEP 1: Access other stuf with arguments obj |
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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| GOAL: Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ | |
| // EXAMPLE TEST: | |
| // destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1] | |
| function destroyer(arr) { | |
| // STEP 1: Access other stuf with arguments obj |
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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| GOAL: Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ | |
| function destroyer(arr) { | |
| // Remove all the values | |
| return arr; | |
| } |
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
| // CHALLENGE: https://www.freecodecamp.org/challenges/seek-and-destroy | |
| /* | |
| You will be provided with an initial array | |
| (the first argument in the destroyer function), | |
| followed by one or more arguments. | |
| Remove all elements from the initial array that | |
| are of the same value as these arguments. | |
| */ |