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.
Please what does the split('0') do in this code
Object.assign
takes two arguments in this case.The first argument is the target (to which properties will be assigned), in this case
Array.prototype
The second argument is a source (from which to assign properties), in this case the methods specified in the instructions (square, cube, sum, etc)
The properties (methods) from the source are applied to the target, and the target is returned. In this case the return value is not necessary but the target ie:
Array.prototype
is modified (mutated).This is how many libraries like
lodash
and others work, "under the hood".Like this a lot. Brilliant
superb man , it is good to understand too. I manually made it binary but no worries it took me just 5mins
gerat!
Fascinating
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
someone explain please
i was confuzzled on this problem for an entire month
when i solved it in 7000 lines of code only to see this
i just quit
This comment is hidden because it contains spoiler information about the solution
great solution mate, can anyone tell me that, One line solution is better or mine is better?
i can write in one line but i think mine is more easy to understand, is spliting one line code to 2 or more is a bad habbit?
I love it, so clever 😁
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...