document.close() method finishes writing to a document, opened with document.open().
Note: If the document.write() call is embedded within an inlined HTML <script> tag, then it is necessary to call document.open() method before writing to a document and document.close() after writing to a document.
Please do google search for:
Join Our Channel
This channel is primarily useful for Full Stack Web Developer.