Block scope and variable shadowing in JS
To understand shadowing in JavaScript, we need to be clear with the scope first.
Refer the below link :
SCOPE
Shadowing is nothing but a variable replacing the value of another variable inside a block if declared with same name.
var a = 10 ;
...
vijayashree.hashnode.dev1 min read