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.
How do I return the string when the .toFixed method is only work on number?
You're returning a string, not a number.
Example gives result of 100.00 (rounding to 2 decimals), but test cases give result of 100, and 421... Frustrating
No, you're returning a string, not a number, and that's your mistake, not the kata's fault:
I took out Math.floor and it still does not work. It's kata issue not my code.
That's a problem with your code, not a kata issue:
You're using floor.
Can't get it to work. did not like 2 decimal places. did not like round up or round down. Request author of kata to explain.
love it!
This comment is hidden because it contains spoiler information about the solution
Mine does the same thing. My answers look just like the expected answers. This is really frustrating. I cannot train on this site if I keep running into these issues
No, your function only needs to return a number, the string is part of the error message.
I don't believe this kata is 7kyu. I keep failing because it is testing for backslash in the string. When \ is present, string behaves kind of funky. Author should change either the level or be more clear in the instruction.