The open() method opens a new browser window, or a new tab, depending on your browser settings and the parameter values.

window.open(
  'https://codeyz.com/',
  '_blank' // <- This is what makes it open in a new window.
);

Leave a Reply