What exactly is the scope? Why do we need it?
Scope determines the accessibility/usage of variables, functions and objects from different parts of the code.
Before diving into its types, there is a term called lexical scope. Let's try to understand t...