For example, you could use the window
object to call the alert
function:
window.alert("Hello World!");
You could also use the window
object within the window
object:
window.window.alert("Hello World!");
Heck, you could even do this:
window.window.window.window.window.window.window.window.window.window.window.window.window.alert("Hello World!");
I know this is ridiculous and no sane developer would do this in real life but why is this possible?
Why are there so many nested window
objects?