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.
You're not handling all the edge cases. Try again, it works, I promise! :)
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 :)
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.
In your code :
. . . you didn't create a new array, you just create a new alias (
newArr
) for array passed as argument (array
);Then when you
.splice
yournewArr
, thearray
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!
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
This comment is hidden because it contains spoiler information about the solution
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.