I learned how to code at university, so I've been at it since 2014. I've dabbled in open source contributions but would like to get into it more. Other than 1's and 0's, I love to travel.
The order matters. Declare it
into a variable and then call it.
I might be incorrectly interpreting what you're saying, but have you heard of IIFE? developer.mozilla.org/en-US/docs/G...
You can create a function and immediately call it while storing the result in a variable.
Exactly! It was more related to hoisting. I mean, there must be an error if I call the function expression before its declaration. Otherwise with traditional functions it won't happened.
By the way, thanks for the information about IIFE, I will read up on it.
I learned how to code at university, so I've been at it since 2014. I've dabbled in open source contributions but would like to get into it more. Other than 1's and 0's, I love to travel.
I might be incorrectly interpreting what you're saying, but have you heard of IIFE? developer.mozilla.org/en-US/docs/G...
You can create a function and immediately call it while storing the result in a variable.
I think the author was referring to the fact that function expressions aren't hoistered.
Exactly! It was more related to hoisting. I mean, there must be an error if I call the function expression before its declaration. Otherwise with traditional functions it won't happened.
By the way, thanks for the information about IIFE, I will read up on it.
I definitely misunderstood the first time through so I apologize for that.
There's no problem Thomas! Thank you for your response and help.