Everything you need to know about Scope and lexical environment in JavaScript.
Before moving further to learn about Scope. First let's write a simple code.
function print() {
console.log("hello");
}
print();
As we know the above code gives us an output of hello. But instead of writing this if we write like this
function pri...
·5 min read·webdeveloper2212.hashnode.devRead the article
Deepti Dubey
Nice explanation