document.open() method opens a document for writing.
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.