DEV Community

Cover image for Variable Shadowing in JavaScript

Posted on

Variable Shadowing in JavaScript

If you declare a variable within a certain scope (decision block, function, or inner class).It has the same name as a variable declared in an outer scope. This is called variable shadowing. How it works. let's start...

Alt Text

Also You can understand more about it.
Click here,console

I hope this is useful javascript tips. if you like please follow, share,comments and like. (Muhammad Rizwan Alam)
also please don't forget to subscribe my youtube channel

Discussion (0)