Open new tab - web using custom js

Possible to open new tab with URL in web using custom JavaScript?

example: window.open(URL,’_blank’);

like that?

Thanks you!.