Scopes in Javascript

Md Shahab Uddin
The Startup
Published in
3 min readDec 8, 2020

--

Photo by Bruno Berger on Unsplash

The scope is a term which decides which variable is accessible from which position. It decides the accessibility of variables. There are many kinds of scope.

Global scope: They are accessible from anywhere of the code

Local scope: It is mainly of two types as Function scope and blocks scope.

Function scope: Anything declared inside a function is inaccessible from the outside…

--

--