i don't get it. isn't the last one already accepting only one argument?
thanks, glad you liked it.
Well, you're definitely making the most of the test framework and the platform! This could especially be useful when there are lots of test cases with long output.
What's with this '...it doesnt mean your code will pass my tests' warning?
I'm lost at test case 17. It fails with this message:
Message of previous test is "We have a problem"
Doesn't actally have anything to do with Math.random. You just need to fix syntax errors.
There is an extra step to pass the tests which has nothing to do with syntax, and is not mentioned anywhere. We just have to discover it from failed test result.
Your solution is not taking invalid values of n into account.
That's initial value. if you provide it, in the first call, your a will be equal to it and b will be equal to first value in the array.
If you don't provide it, a will be the first value and b will be the second value in the array.
It doesn't make much difference in this example, but imagine you wanted to add the numbers as a string rather than sum them. You could provide the initial value as an empty string and get something like 1234567 as a result.
You're right. There was a problem with the second example test case, i fixed it.
haha, i was doing this on a bus with a chromebook. guess i got distracted on the way :)