Although shadowing should never be used (or just to obfuscate) because it's confusing, I wanted to completely understand it. And I got this strange thing :
alert(parseInt('123'));//Here, I expected 123 but it's 'overshadowed'
function parseInt(){return 'overshadowed';}
alert(parseInt('123'));//Here it's 'overshadowed' too
Why the first alert
output 'overshadowed' whereas the function is not modified yet?
P.S : I got inspired by Variable shadowing in JavaScript