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.
.
If the tests don't catch it, don't blame the solution.
It clearly states what to return.
the function of the example of the instruction is adder, I think it should keep all the return values in that case.
but it's not a big deal, not the key point of this kata.
It's normal practise use [].someFn .call()/.apply(). If you like save memory, why you chose JS?
Description is not written well.
Actually the kata description is vague about it.
If I call my spying function and it returned
1
, I can say, "Yes, it returned 1". The description does not mention some kind of memory, neither the tests.Your "spy" only saves the last return value of func it's spying on, but as I understood the problem it should keep all the returned values and answer the question "did the func ever return this value?...". It's just a small change, though.
It's considered not a good practice to use
[].someFn.apply(...)
. You're creating a new array in memory. Best to useArray.prototype.someFn.apply(...)
instead.Better test cases needed; the quiz requirements say the function should return an array with 'numbers first, method names after' without mentioning any particular order, while the test cases are sensitive to the order of the elements.
The
join.when()
function should return errors and values in the same order the callbacks had beenadd
ed even if thefutures
were resolved in different order than they were added.The current test cases are not testing for it so a wrong solution passes.
omg, parenthesis are omitable... That's awful! Good to know, though.
You should consider the case when neither after, nor before functions exist ;)
Kata description is a little misleading: it gives an impression that the clean function should return an array of removed values, while it is expected to return the filtered array of "truthy" values.
Thank you very much! I don't know whether I would ever notice that :)
It turned out to be a boring "missed by 1 iteration" mistake after all.
Enjoyed this kata a lot!
Loading more items...