Ad
  • Custom User Avatar

    Suggesting the modification of a built-in prototype in Javascript is an anti-pattern.

  • Custom User Avatar

    Clojure includes an incorrect test case:

    expected: (= true (isPowerOf4? 0)) - actual: (not (= true false))

    0 is not a power of 4.

  • Custom User Avatar

    The 5th test is an array of 5 objects, none of which have the property to split on defined. It looks like you aren't handling undefined correctly?

  • Custom User Avatar

    Shouldn't be re-declaring 'var scaleResult'

  • Custom User Avatar

    When someone added a coffeescript example, they broke the description formatting, which killed the example code that showed what the response would look like. I fixed it and added a longer description of the return object.

  • Custom User Avatar

    The test cases are looking for truthy values, not just boolean true.

  • Custom User Avatar

    What does your solution look like? There are 2 test cases that could be failing.

  • Custom User Avatar

    Would that have been possible? I suppose with a function.toString and then checking for multiple instances of the word test? Even that could be gamed though... var fake = //.test, fake.apply(...) && fake.apply(...).

  • Custom User Avatar

    To answer why +110, getYear() returns year relative to 1900. The refactoring was likely to use getFullYear(), which returns the full year relative to 0.

  • Custom User Avatar

    This kata encourages modifying the prototype of a built-in object, which is very much not a javascript best practice. While I like the concept, I would have preferred that it start with some sort of chain() call which would return a wrapped object that included the 5 methods plus in implementation of valueOf for conversion back to a number.

  • Custom User Avatar