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.
rip me lmao
Whoever wrote the JavaScript testcases wrote the expected and the actual the wrong way around for the "More tests" section.
Testcases are written:
Test.assertEquals(actual, expected)
but they wroteTest.assertEquals(expected, actual)
e.g. they wrote
Test.assertEquals(false, ' '.digit());
.So, just switch what is expected and what your code is returning.
No, a pin number will always be string because if the number was an integer it would convert it to its simpliest form (simplify it). For example "0001" is a valid pin number but if it was an integer it would be 1, which is an incorrect pin number. Therefore, the original answer is a more appropriate solution.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Did you ever think about casting the array to a string?
Your grammar is slightly wrong.
Change
"no ones like this"
to"no one likes this"
Change
"likes"
to"like"
Change
"like this"
to"others like this"
in the statement"Alex, Jacob and 2 like this"
0 people = "likes"
1 person = "likes"
> 1 person = "like"
Make sure you read the output box properly.
This comment is hidden because it contains spoiler information about the solution
Ik, I don't know why people voted "Best Practices", I guess they might be unfamiliar with Java.
Read the description again. Why are you breaking out of the loop? It says
+0 for each blank answer(empty string).
so you shouldn't break out, just add 0. Also, this is not an issue, mark your comment as "question" next time you don't know the answer to the problem.The
return
statement.Fixed
This comment is hidden because it contains spoiler information about the solution
@nikolaysalinder it's Code Golf where you try to get the shortest possible code. So readability doesn't matter.
You have to return it, not print it to the console.
Loading more items...