To close your current window using JS, do this. First open the current window to trick your current tab into thinking it has been opened by a script. Then close it using window. close() .
How do I close a window in JavaScript?
To close your current window using JS, do this. First open the current window to trick your current tab into thinking it has been opened by a script. Then close it using window. close() .