The Window.close() method closes the current window, or the window on which it was called.
Window.close()
MDN Reference