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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
same, I've complicated my code too much with many conditional statements.
http://javascript.info/
Can you please recommend a resource in which i could learn of all these tricks, such as this destructuring operator
that's what makes it so powerful. you can still go off and write your own methods/solutions to problems you encounter much like you would in java, but if you happen to know little tricks like these it can make the whole process much easier.
It probably means that once you've learned the methods you will find everything very easy as you've already built a strong foundation through java.
Haha, same. Had like 30 lines.
This comment is hidden because it contains spoiler information about the solution
Since
num = num.toString();
he converted every number to a string andmap(Number)
converts them back (he needs them to be in order not to mess up the reduce method).Since
num = num.toString();
he converted every number to a string andmap(Number)
converts them back (he needs them to be in order not to mess up the reduce method).Since
num = num.toString();
he converted every number to a string andmap(Number)
converts them back (he needs them to be in order not to mess up the reduce method).Not necessarily. However, knowing these approaches, JS lets you write shorter, terser and in most cases more bug-free code.
You can achieve a lot faster. At the expense of some performance, of course, when it matters. But most of the time performance is not an issue.
Writing your own code is not bad per se, but you do get more chances to get it wrong and let bugs sneak in.
Built in JS array & object methods are well tested and relying on them is pretty predictible and less bug-prone.
No, you can still use dot notation, but only if the string identifier has no spaces in it.
This comment is hidden because it contains spoiler information about the solution
Loading more items...