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
This comment is hidden because it contains spoiler information about the 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
You are ${n-m} ${year} old.
would be betterwhy is that?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
That's a clever way of concatenating strings
Why
-n+m
instead ofm-n
?Not so beautiful but, anyway...
Codewars could have a button for bad solutions
Why people are voting "Best Practice" to a String concat loop?
string.toCharArray() underneath makes a copy of the String character array (defensive programming)
If we prepare array by making new char[string.lenth()] and then iterate trought string using chatAt(i) we could avoid one array copy
Loading more items...