Ad
  • Custom User Avatar

    You're not handling all the edge cases. Try again, it works, I promise! :)

  • Custom User Avatar

    Just completed it for JS. It worked, so it seems like you got something wrong in your code, review it and try again. Good luck :)

  • Custom User Avatar

    If the number is higher than the max safe integer (Math.pow(2, 53)-1 is the latest safe number), the result loses it's precision.

  • Default User Avatar

    In your code :

    ...
      var newArr = array;
    ...
    

    . . . you didn't create a new array, you just create a new alias (newArr) for array passed as argument (array);

    Then when you .splice your newArr, the array argument is also modified.

    You'd better try to copy the array ( you may take a look at mdn or stackoveflow )

    May the code be with you!

  • Default User Avatar

    This kata is excepting a number string, and not a scientific number (e+X)
    You have to approach this the same way you would approach this on paper

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This is a 4kyu kata. The description doesn't give you insight to the difficulty of the kata, failing the test cases do. 7.125774134884027e+26 written out is 712577413488402700000000000 but the answer is really 712577413488402631964821329.