Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
No. This test case means that you also need to handle closures properly, i.e you shouldn't just create a new function and call it; you need to call the original function.
Even if you passed this test case, there are more tests that plays with closure. For example, this is the test after the above test case:
What is the expected behavior of this test case? return NaN or throw exception?
It should be
var timesFive = function (x) { var five = 5; return function (a) { return five * x; }(x); };
. The test case is incorrect.Thanks, I have never used destructuring like this
What happens when you call toString on timesFive? You'll find it doesn't give "var timesFive = function () { var five = 5; return function (a) { return five * x; }; }();" so you'll need to find a solution that does.
i belive this is tooooooo big for the most programming languages i had the same error at the number 689 in php
I have the same problem. Would someone help us?
It passes with JS but beware of the way you calculate "choose".
Agreed