Please enable JavaScript.
Coggle requires JavaScript to display documents.
JAVASCRIPT - Coggle Diagram
JAVASCRIPT
Scope
1) Global Scope,and,
2) Function Scope,
3) Block Scope.
4) Lexical scope
5) Nested Scope
Link Title
Variables: Variables are containers for storing data
let
Cannot be redeclared and have a block scope.
Using a let variable before it is declared will result in a ReferenceError
const
const variables must be assigned a value when they are declared and they cannot be redefined.
It does not define a constant value. It defines a constant reference to a value. Example: you can change elements of a const array but you cannot reassign an array
var
Can be redeclared
You can use the variable before it is declared
Context
Global Context
window in web browser
global in node.js
Execution Context
Scope chain
this
Variable object