Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

write function in JavaScript

document.write()

This function is used to write arbitrary HTML and content into page. If we use this function after an HTML document is fully loaded, will delete all existing HTML. It is used only for testing purpose.

Below some syntax of document.write() function

Syntax :-

Example:-

Output:-

Result Output

Chandan Kumar
Follow Me: