Scope in JavaScript
Scope
Every variable in JavaScript has a scope, scope is basically where the variable can be accessed in the code. let and const variables are block-scoped while var variables are global/function scoped. A block a piece of code that is enclosed in {}...
saurabhsuryavanshi.hashnode.dev3 min read