Scope of variables in JavaScript

1) Global Scope

2) Local scope

3) Block Scope a) No block scope in JavaScript till ES6.

b) ES6 introduced let

4) Intermediate: Object properties

5) Advanced: Closure

6) Advanced: Prototype-based…

Write a basic Object Oriented JavaScript class