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
Yes, I thought they were locked because the test cases were locked. They also use test.expect. But, should it be consistent and use Test.expect or some other function
Well, while sample tests are indeed not obligatory, lack of them is often considered a kata problem, isn't it?
Not an issue. 11,000+ people completed in javascript. Press attempt.
Sorry for the late reply. So the empty string before I put the line number tells java that this is String addition. In this case, I am not sure it is necessary beacause I am adding another String right after. Also, I made this a long time ago, so this is not good coding practice at all. String addition is generally bad practice because it takes up extra memory (Strings are immutable).
Just to answer your question more clearly:
(5) is an int
("" + 5) is a String
For clarity, String.valueOf(5) is probably better.