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.
ikr, gives me headache
i dont understand why people voting but its very unreadable and not clever 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
ninja
Why not?
This
Array(index+1)
creates some undefined elements and the number of the undefind elements depends on what is passed as an arguement to theArray()
, which in this case isindex + 1
, and the.join(x.toLowerCase())
fills up the undefined elements withx
lower cased.I hope this makes sense too.
PS: This is not a good practice because of the undefined elements that is created.
Thanks.
Excactly. This comment should be permanently added into this solution.
This comment is hidden because it contains spoiler information about the solution
can somebody explain it a bit more expand why we are creating a new array here and how is it useful thanks alot!