For example, in the code below, why not just declare const WHATEVER = value; since it’s constant and won’t be changed anyway? Learning that in Javascript this is possible, but don’t see the application. Thanks!
const myFunc = () => "value";
For example, in the code below, why not just declare const WHATEVER = value; since it’s constant and won’t be changed anyway? Learning that in Javascript this is possible, but don’t see the application. Thanks!
const myFunc = () => "value";
Nevermind. I was too impatient. The specific code example might be better off as a simple const declaration, but this sort of syntax can also accept arguments like the code below, which is helpful.