java-script:hoisting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
java-script:hoisting [2023/08/09 00:32] – odefta | java-script:hoisting [2023/08/09 00:32] (current) – odefta | ||
---|---|---|---|
Line 29: | Line 29: | ||
==== Without any keyword ==== | ==== Without any keyword ==== | ||
- | Variables that are declared without any keyword (such as var, let, or const) are not hoisted. Rather, **they become global variables** (if not already within a global scope), and their declaration and initialization happen at the line where they are assigned. \\ | + | ;;;Variables that are declared without any keyword;;; (such as var, let, or const) |
Example: | Example: |
java-script/hoisting.1691530338.txt.gz · Last modified: 2023/08/09 00:32 by odefta