HTML DOM Document close()
HTML DOM Document close() Method
The close() method is used for closing windows previously opened with the open() method. Also, the document.open() method is used for clearing everything in the document i.e, it will overwrite.
Syntax:-
Its syntax is:- document.close()