Following script will Open new window if not exist else refresh window if already exists in Javascript using window.open function.
Here is simple code:

[crayon-5bedf9be7c38f826457399/]

–Open new window if not exist else refresh window if already exists in Javascript–