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.
Apparently the function has to be named 'square', which you only realize with the error message after attempting it. Very very poorly described Kata, in my opinion.
Nice clean code. Good Job!
Simple and efficient !
Nice!
Please use spoiler flag next time, your post was visible in the homepage.
This comment is hidden because it contains spoiler information about the solution
Well this is a good method because i can also change a number to binary with base 2. Normal String(num) method cannot do that !
try it, i think it just wouldnt return the val?
I was trying for a while, then I saw your solution and I was like '-'
simple ♥
But it's slower
I think the testing unit is checking what your function has returned matches the correct answer it has and it doesn't check what you have printed on console.
e.g. checkAnswerWithCorrectAnswer( numberToString(123), '123')
did you figure out why?
Wow nice solution!
because it can change the radix.
Loading more items...