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.
I saw some of the "correct anwsers" and they should not be accepted.
Please, someone write this test:
Edit:
This chanllenge needs to be rewriten if you really want to return
undefined
if any of the values aren't numbers.That was a little tricky one. I had to scratch my head for a while to find a solution. I'll made a suggestion for the newcomers read the intsructions carefully.
There's a bug in the test cases and width the biwised solutions. 0 is not a power of two cause any number powered to 0 equals 1, so there should be two mandatory tests:
Test.assertEquals(isPowerOfTwo(0), false);
Test.assertEquals(isPowerOfTwo(1), true);