In this article, we will see scope, scope chain and lexical environment. Let us first see a script and try to guess its output function a(){ c() function c(){ console.log(b) } } var b=5; a(); //output:5 In the above program, the javascript engine wi...

Markdown supported · ⌘↵ to post
Aakanksha Dhurandhar👩💻
Saurabh Mhatre
Frontend Developer
Good article with detailed examples and diagrams for explaining concepts. Keep it up 👍