Remove Item from Array Missing Argument? #1

acarr opened this Issue Apr 12, 2012 · 4 comments


None yet
2 participants

acarr commented Apr 12, 2012

In the Arrays test the test "you should be able to add the values of an array" has


So here fn(a) should return a number. But in the next test, "you should be able to remove an item from an array"

 var result = fn(a);

Here it is assumed that the result should be an array and you're are expected to remove "2" from the array but that has to be hardcoded into "fn" as the value "2" is not known to "fn."

Is this part of the test and is just a curveball or is it a typo?


rmurphey commented Apr 12, 2012

I agree, it seems it would be best for the function in the second test to receive 2 as an argument. I will update!

rmurphey closed this in d2a6f96 Apr 12, 2012

acarr commented Apr 12, 2012

Looking at it again you keep running into the same problem. So now the first test and the 4th test contradict eachother.

I'm just realizing, because this isn't a "function" you're testing in an app but a Javascript test, should fn just be overwritten in between each test?


rmurphey commented Apr 12, 2012

Yes :) Each test should redefine fn to make the test pass.

acarr commented Apr 12, 2012

Ahhhh ok. I was looking at it the wrong way. Trying to make the almighty "array" function. :)

@joshvillahermosa joshvillahermosa added a commit to joshvillahermosa/js-assessment that referenced this issue Apr 21, 2016

@joshvillahermosa joshvillahermosa [functions.js] Finished array arguments test (#1) b83abc4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment