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.
mind-boggling🥵
If it's only 1 statement, you don't need brackets. See documentation for more details.
How it's working why he doesn't use brackets {} for loop?)
Input mutation can interfere the tests.
clever approach!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Very nice!
Good!
It's actually a well-known recursive algorithm. ;-)
My first try was clunky as well, and when I saw this solution I re-submitted this piece of code, just not to lose it. There's plenty Kata's for which this is a helpful subroutine.
this hurts man... after spending so much time on the code, seeing 1-line solutions is painfull. Anyways. Good job!
Array(n)
creates an array of lengthn
,[...Array(n)]
creates an array filled withundefined
, of lengthn
.Can you explain how you brought an array into the function without 'let arr = []'?
Agreed
This comment is hidden because it contains spoiler information about the solution
Loading more items...