To understand variables shadowing in JavaScript, first, we need to understand the scope.
In JavaScript, we have global scope, function scope, and block scope.
The scope is something like a box, that has other boxes inside of it. Each box represents a...