You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Hoisting is when JavaScript splits the variable and function declarations"
This part is a bit confusing for two reasons
It isn't clear what this 'splitting' actually looks like or what it means. A bit more explanation (and an example or two) would be useful.
From my understanding of hoisting, it's really the variable declarations and variable assignments that are being 'split' or 'decoupled', with the variable declarations being sent to the top while the actual assignments of these variables are left in their usual place in the code.
The last part suggests that function declarations are also split. From my understanding, functions are just pulled to the top of the page without being modified. Variables definitions within functions are hoisted to the top as well during the variable part of hoisting, but there is probably a better way of describing this.
The text was updated successfully, but these errors were encountered:
@edwardlanto
"Hoisting is when JavaScript splits the variable and function declarations"
This part is a bit confusing for two reasons
The text was updated successfully, but these errors were encountered: