Javascript window vs window

In Javascript, I add a global variable to the window object. But it looks like I can execute either of these two versions of window / window :

 Window.foo = "Bar"; window.foo = "Bar"; 

What is the difference between window and window ? Is this just an alias for another? Which one is standard? I can not find any documentation explaining the difference between the two. Is this a non-standard function for posting bad syntax?

0
source share

Source: https://habr.com/ru/post/970221/


All Articles