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.
Good one with the prototype. but if the object will be created with the class, the prototype is created automatically.
from javascript.info
"
But if there is a return statement, then the rule is simple:
If return is called with an object, then the object is returned instead of this.
If return is called with a primitive, it’s ignored.
In other words, return with an object returns that object, in all other cases this is returned.
"
Not sure, but I think beceause as soon as you call the NameMe function you will get the object back that is returned inside NameMe. So it will only get you the name. But if you return nothing you will get "this", so the NameMe object itself.
But it makes it easier to read.
Please use spoiler flag next time, otherwise your post is visible in the homepage.
This comment is hidden because it contains spoiler information about the solution
It's in the description:
why we need to compare with 20?
Parentheses are superfluous for multiplication.
Usually it would not be the best practice because of variable leakage, but this kata is made for this xD.
can anyone explain how this works.
This comment is hidden because it contains spoiler information about the solution
whoops got the !!! parameters the wrong way round, and it looks like a glorified listToMaybe
This comment is hidden because it contains spoiler information about the solution
Fun & informative, good job. Onto the next one.