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 mistakenly wrote
result++;
while you probably meantnum++;
.result
is anArray
and using the++
operator on it converts it to aNumber
, andNumber
s do not have apush()
method.Actually, since you would never really need a fraction of a cent, you will round to 2 decimal places. Besides, with things like this, the result is almost always in scientific notation, which is just confusing. We need a place to round to.
That's the point.
It's testing to see if your code can determine whether you're ending up at your original spot. If your code can't determine that, it's incorrect code.
This comment is hidden because it contains spoiler information about the solution
Remember, it can't be changed now.
No, but it's too late to change it anyway.
Read this: https://github.com/Codewars/Codewars.com/wiki/Markdown-Formatting#block-code-formatting
Nvm, figured out the problem. Can't delete my comment, though.
Also, anyone know how to make my code look...not weird in that comment?
This comment is hidden because it contains spoiler information about the solution
After completing this kata (clicking "Attempt" and passing), then trying to test again (even with the same exact code), you get this error message (might be something else but that's how I've managed to get this to happen):
/home/codewarrior/node/test.js:13
;(function() {
^
SyntaxError: Unexpected token ;
Yea, my code passed all the sample tests...but doesn't work because I couldn't see the rest of the tests.