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.
Suggesting the modification of a built-in prototype in Javascript is an anti-pattern.
Clojure includes an incorrect test case:
expected: (= true (isPowerOf4? 0)) - actual: (not (= true false))
0 is not a power of 4.
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?
Shouldn't be re-declaring 'var scaleResult'
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.
The test cases are looking for truthy values, not just boolean true.
What does your solution look like? There are 2 test cases that could be failing.
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(...).
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.
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.
No var?