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.
could you explain, what is an autocasting?
ways
array contains different solutions for this Kata.stringToNumber
function executes all the functions in the array and then compares their results using thecheckThemAll
function.checkThemAll
function checks each next element. If at least one is incorrect, it will return NaN (and the tests will fail).Thus, we just execute all the functions in the
ways
array sequentially and check that they all give identical results.Frankly, these were my first steps in JavaScript. So I just got carried away experimenting with type conversions.
And I'm not an alien, I'm a human :D
Right shift (>>)
Because it looks cool :)
auto casting