Use window.open
The window.open
method lets us open a new window or tab from a given tab.
For instance, we can write:
window.open('http://example.com', '_blank');
to open a new tab that opens http://example.com.
_blank
means we open a new window.