Window open() Method
In the above code, the return value , stored in the variable newWindow, is the reference to your new window. You can use this reference later, for example, to close this window (newWindow.close()), give focus to the window (newWindow.focus()) or perform other window manipulations.
The important Parameter of window.open() method are url, name, left, top, height and width. The other parameters are toolbar, menubar, scrollbars and resizable.
Such types of Popup windows were overused and exploited by many websites during the earlier days of the web. This resulted in the later versions of browsers blocking popup windows . Eventually, popup windows became almost extinct now. Automatically opening popup windows is considered a very bad practice nowadays.