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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
(JavaScript)
This challenge is very hard to debug.
When I click "Attempt", everything that I log while my function runs is spat out in a block at the top, rather than being printed out next to its test case.
Because of this, I can't find any of the logs for my failed test cases.
Could the tests be set up differently so that logs print next to their test cases?
This comment is hidden because it contains spoiler information about the solution
This is fantastic! I never would have thought to destructure the charactters in the string.
Math.floor()
is used because the brief requests the answer rounded down to the nearest integer.This comment is hidden because it contains spoiler information about the solution
This Kata is a bit of a wreck.
While the challenge itself should be ranked at 7 kyu, the Module Pattern (used in the JavaScript version) may require more understanding than a 7 kyu level and is completely unnecessary for this challenge. A standard function call would have been much more practical.
On top of that, the checks for positive numbers require spaces around the "=" but the checks for 0 and for negative numbers require no spaces around their operators.
Please add sample tests.
I rather like this solution.
THANK YOU!
I was absolutely stumped because of this.
I was using
photoManager.addName
withphotoManager.nameWasUnique
in my original implementation, and was frustrated with all of my checks resulting in false.The line of code
const message = "Just throw like this!";
returns the errorError: I think you are cheating, your code have throw.