Tell us what’s happening:
This isn’t an issue. Just started going through Arrow functions here, and wanted to understand a few things.
- The example over here performs a simple assignment of “value” to the constant myFunc.
const myFunc = () => "value";
Is there any benefit to doing that as opposed to performing this assignment simply by
const myFunc = "value";
?
2. This may seem silly, but the exercises here always require me to make sure I’m not using var
anywhere. I need to either use const
or let
. Is that just for practice, or does ES6 encourage developers to never use var
?