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.
Fascinating
... this kata WAS meant to be solved using functional programming.
Thanks both for the explanations
This comment is hidden because it contains spoiler information about the solution
Amazing!
This comment is hidden because it contains spoiler information about the solution
Looks nice and readable
smart way!
Well here
Array
is an object andObject.assign
does what it's name tells us, it assigns or say inserts the given properties to the given object.As here we are assigning those
square, cube etc
properties to theArray.prototype
object.Hope you get it?
else do let me know, I will give you some examples!
BTW CLEVER code!
Can anyone tell me how is Object.assign() working here
This comment is hidden because it contains spoiler information about the solution
Nice catch of using Object.assign in order to avoid accessing the Array prototype repetitive
Very clever
nice one!
it's a solution if it passes the test cases.
Loading more items...