Skip to content

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. Note: You have to use the arguments object.

Notifications You must be signed in to change notification settings

Nobledsmarts/seek-and-destroy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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
Note: You have to use the arguments object

Tests

destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1]

destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3) should return [1, 5, 1]

destroyer([3, 5, 1, 2, 2], 2, 3, 5) should return [1]

destroyer([2, 3, 2, 3], 2, 3) should return []

destroyer(["tree", "hamburger", 53], "tree", 53) should return ["hamburger"]

destroyer(["possum", "trollo", 12, "safari", "hotdog", 92, 65, "grandma", "bugati", "trojan", "yacht"], "yacht", "possum", "trollo", "safari", "hotdog", "grandma", "bugati", "trojan") should return [12,92,65]

About

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. Note: You have to use the arguments object.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published