🈯declaration
🚧 under construction -> function*
⭐️ only the following are (9) declarations:
let / const ( ⚠️ var is a statement❗️)
⭐ declarations and statements are different❗
statement vs. declaration
var is a statement. (👉 var is a statement❗️)
let/const is a declaration.
in a module there's no "module scope object" for these top-level declarations to be added to as property.
( 👉 compare: global var / function is global object property❗️)
declaring variables
⭐var is a statement, not a declaration. 👉 statement expected❗️❗
lexical environment - stores local variables/functions.
function*
async function
async function*
Last updated
Was this helpful?