Ad
  • Custom User Avatar

    I saw some of the "correct anwsers" and they should not be accepted.
    Please, someone write this test:

      Test.assertEquals(cubeOdd(["12","9"]), undefined);
    

    Edit:

    This chanllenge needs to be rewriten if you really want to return undefined if any of the values aren't numbers.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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);