Please enable JavaScript.
Coggle requires JavaScript to display documents.
Scope & Closure (Hoisting (hoisting function declaration inside blocks…
Scope & Closure
Hoisting
hoisting function declaration inside blocks are happening to the enclosed scope. This might be changed and considered as a bad idea to define function in code blocks
-
-
-
-
functions are hoisted first and if there's variable with the same name declared, the declaration is ignored
What is Scope
-
Closure is when function can access it's lexical scope even when it is called outside of its lexical scope
-
-
-