JavaScript Scope

In JavaScript, Scope determines the accessibility of variables. JavaScript has 3 types of scope: Block scope, Function scope & Global scope

Code :