Learn JavaScript Variables | Learn Function Closure | Learn Function Scope, Outer & Inner Block
JavaScript Variables
Variables are storage locations in memory,
where you can store a value and use it as a
part of any expression.
Varibles are like a container to store a value so that we can use
it again and again.
Q. Is it Mandatory to Declare Variable in javascript
ans : no, but it is mandotory to declare in strict mode.
Variables Phases : Declaration
Assignment
Initialization
Variable Keywords:
var
Let
Const
function scope
outer block
inner block
function closure.