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.
I just happened to see some examples of how this function worked yesterday otherwise my code would've been a lot longer im sure 😅
This comment is hidden because it contains spoiler information about the solution
Mutating an argument is the worst thing you can do.
from billion variations i see solution without unrequired minmaxes (as well as mine).
in my opinion it is the best option
Thank you for this! took my understanding of parseInt a step further. Awesome.
easiest way to do it
same solution ^^
This comment is hidden because it contains spoiler information about the solution
I like how short and clean this is, without being too obnoxious.
This comment is hidden because it contains spoiler information about the solution
This approach is not good. It changes the parameter if it has a falsy value, for example if an empty string were passed to firstName or lastName, it would be changed to the default value, which is incorrect. The correct way is to use default parameters.
I don't think I was aware of the default parameter feature when I solved this. If I were to solve it again I would use default parameters.
What's the benefits of this approach over the top solution?
ie. assigning fields directly inside body vs. exposing them as default paramters.
Why can't i write souch a short code...
I always write long code(
this parseInt odd behavior was probably implemented in such way only because of this Kata
Loading more items...