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.
no way bruh
"That one guy"? This is the second most popular solution. 😆
there is always that one guy with the arrow functions
Implicit returns in arrow functions are dependant on the lack of a body block, not being one-line.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Function_body
Also arrow functions context differ from regular function expressions and declerations. They follow Lexical scope. I recomend reasearching this difference and when it is better to use an arrow funciton over other ways of writing it. It makes a difference when using the 'this' key word.
the most common use is just to make things shorter. Arrow functions automatically return without specifying 'return' if the function is on one line.
that notation is for ECMAScript 6. We should all use it.
const
is short for constant, which means it will never change. Under normal circumtances, functions can be redefined later, butconst
cannot.As for performance, it depends on the execution engine. If the Javascript is being compiled (as happens on many browsers nowadays), then
const
can be faster than the standardvar
, since the compiler can optimize on the content ofconst
never changing. That being said, you'd probably need a ridiculous Javascript app to actually see the performance benefits, slight as they are.is there any difference between them?
no, it's not
Is the
const funcName = ...
faster thanfunction funcName...
I see it so often here.There are too many 'Fizz Buzz'
It seems pretty obvious that "30" for instance should only return "FizzBuzz". It's a duplicate anyway
instrucions are flawed. should specify the order of importance for numbers that are divisible by more than one of the options (i.e., 15, 5, then 3)
Duplicate.
Total duplicate.
Loading more items...