Untitled 2
Untitled 2
TEXT
HOISTING IN JAVASCRIPT
We can access variables and functions
before initialising without any errors this is
called hoisting.
HOISTING..
Recap, Before running the code memory
will be allocated(Memory creation phase),
for variables it will be undefined and for
functions it will be stored as function. So
from memory it will take it as undefined for
variables.
Var x = 10
Function abd(){
Var x = 100;
}
TEXT