If we want to programmatically close a browser window, we can use the `close()` function.
Basically, this method is used to close the current opened window as well as those windows that were opened via calling methods like `open()`.
Note: By default, browsers might not allow you to close a window that we didn’t open programmatically (for example, by the `open()` function).
Window close() Method Syntax:
Window close() Method Parameter:
The method does not take an argument.
Window close() Method Return Value:
There’s no return value from calling the method.