Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hoisting Docs Wording Issue #6

Open
evanlawgray opened this issue Feb 7, 2017 · 0 comments
Open

Hoisting Docs Wording Issue #6

evanlawgray opened this issue Feb 7, 2017 · 0 comments

Comments

@evanlawgray
Copy link
Contributor

@edwardlanto

"Hoisting is when JavaScript splits the variable and function declarations"

This part is a bit confusing for two reasons

  1. 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.
  2. 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.
  3. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant