Skip to main content

Declaration ↔ (process) to create a Variable, usually via Literal

aka Declare, Variable-Declaration, Declare-Variable

Literal

JS Syntax to rep Code as literally written

function

JS Keyword to Declare function (with optional Argument Parameters)

var

JS Keyword to Declare mutable Variable with Function Scope

let

JS Keyword to Declare mutable Variable with Block Scope

const

JS Keyword to Declare read-only named constant Variable with Block Scope

function*

async function

JS Keyword to Declare function with Asynchronous Code to return Promise & allow await inside

return

JS Keyword to specify a single Variable/Expression output from function

Variable Declaration

initial step of creating new Variable by creating a new Identifier

Variable Initialization

next step of assigning value to variable

image

References

  1. Strongly-Typed ↔ of Programming Language to req Type assign for Variable Declaration

  2. importJS Keyword Declaration to import live read-only views on exports

  3. TDZ ↔ Region of Code outside Scope of a variable, variable uninitialized from Scope start to Declaration

  4. Dynamically-Typed ↔ of Variable not fixed to one Type at Declaration, can be reassigned, only become known at Runtime

  5. Template LiteralJS Syntax to Declare string via ` to allow String Interpolation for any Expression via ${}

  6. Hoisting ↔ (mechanism) to access Variable before Declaration

  7. Global VariableVariable Declare in Global Scope or Top-Level Code

  8. functionJS Keyword to Declare function (with optional Argument Parameters)

  9. Object LiteralJS Syntax to Declare & initiate new Object

  10. varJS Keyword to Declare mutable Variable with Function Scope

  11. letJS Keyword to Declare mutable Variable with Block Scope

  12. constJS Keyword to Declare read-only named constant Variable with Block Scope

  13. async functionJS Keyword to Declare function with Asynchronous Code to return Promise & allow await inside