Functions inside variables or consts


#1

Is it necessary to declare a function inside of a const or a let/var?


#2

if you use a function expression, then yes, if you use a function declaration then, no, see the documentation:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions


#3

Ty very much, got it now ^^


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.