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.
is better to use the === instead of ==, for prevent the coersion
I always forget about filter!
i guess it isn't the best practice
i wouldn't call this best practice do
It's created as a property of lexicalEnvironment object of function. This object is hidden. We don't have access to that object directly.
ECMAScript® 2020 Language Specification => 8.1 Lexical Environments
For starters:
%
is a general purpose remainder operator, while&
is a bitwise operator. It wouldn't be surprising for bitwise operations to be faster than general purpose remainder operations (think of C).==
to compare with 0, use===
. It's also slightly faster because of the lack of type checking and conversionProbably a for loop. But the performance gain is probably also trivial, and for loops are less readable because it represents steps rather than logic.
I would like to ask is that really faster - creating function within function than simple for loop ?
This comment is hidden because it contains spoiler information about the solution
What keeps getSecret from being called on createSecretHolder's invocation?
nice and neat,dude
Using function's activation object in order to get and set the 'secret' value. Clever indeed.
This comment is hidden because it contains spoiler information about the solution