Open Popup Window in JavaScript

- 1 minute read

This one-liner, which uses the default method, is all you need to open a popup window in JavaScript:``, `newWindow`);

When executed, the above line of code will open in a new browser window.

Keep in mind that some browsers might try and block popup windows or warn the user before displaying them!

Link to this section Conclusion

Hopefully you found this useful!

Just remember to avoid spamming your users with annoying popup windows everywhere…