Ad
  • Custom User Avatar
  • Custom User Avatar

    If the tests don't catch it, don't blame the solution.

  • Custom User Avatar

    Your squeakyClean function should accept an input array of values and return a new array with all empty strings, 0, null and undefined removed.

    It clearly states what to return.

  • Custom User Avatar

    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.

  • Custom User Avatar

    It's normal practise use [].someFn .call()/.apply(). If you like save memory, why you chose JS?

  • Custom User Avatar

    Description is not written well.

  • Custom User Avatar

    Actually the kata description is vague about it.

    .returned(val) — returns true if spy returned val, else returns false

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    It's considered not a good practice to use [].someFn.apply(...). You're creating a new array in memory. Best to use Array.prototype.someFn.apply(...) instead.

  • Custom User Avatar

    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.

  • Custom User Avatar

    The join.when() function should return errors and values in the same order the callbacks had been added even if the futures were resolved in different order than they were added.

    The current test cases are not testing for it so a wrong solution passes.

  • Custom User Avatar

    omg, parenthesis are omitable... That's awful! Good to know, though.

  • Custom User Avatar

    You should consider the case when neither after, nor before functions exist ;)

  • Custom User Avatar

    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.

  • Custom User Avatar

    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...