#Window Global Object clarification
8 messages · Page 1 of 1 (latest)
If I got it right, would it be just a variable that can be used and modified inside functions?
When you don't use let or const the variable is scoped globally and so is accessible anywhere in your code. If you use let or const the variable is only accessible inside of the current scope and any scopes nested in that scope.
Oh, that makes sense
Just one more quick question, using var, it only scopes to functions right?
And not to blocks
Yeah
All right! Thanks!