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
The confusion seems to come from misreading the body of the arrow function:
In the code above,
map.set('foo', v)
is not called beforenew Map()
because it's inside the anonymous function passed tofoo
.Maybe rewriting like the following will help you understand:
check down three posts!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
More about string interpolation on MDN. The only purpose here was to convert number to string (which happens implicitly within backticks), and this is just one of many ways to do it.
this is JS version of string interpolation (a bit weird to use it there, tho)
This comment is hidden because it contains spoiler information about the solution