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.
Twinning!
I find it quicker to type strings in template Literals/Grave Accent in my code.
Nice work!
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
Using a variable makes your solution longer... which seems like the opposite of what you're trying to achieve.
var=;
are 5 additional characters you could have excluded by using a function declaration.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 ?
Thank you very much for the clue.
It's a usage of template strings, which are also new in ES6. In this instance, it presents an alternative way to concatenate variables and strings together. Undefined variables will still be coerced to the string "undefined".
Can someone please explain or give documentation on the braces around the property ?
${this.name}
Something to handle undefined strings maybe ?
This comment is hidden because it contains spoiler information about the solution
nice and neat,dude
I'm pretty sure most of the tests are non-zero. And there are edge-cases where there are zeros involved explicitly added in. Unless I'm misunderstanding you?
Loading more items...