Shadowing in JavaScript: What You Need to Know
What is shadowing
“Shadowing” might sound mysterious and a little bit sketchy.
But don’t worry, it’s completely legit!
Consider the following code:
var studentName = "Suzy"; //global scope
function printStudent(studentName) {
//local scope of functi...
robinkhilery.hashnode.dev4 min read