How to write normal text code using JavaScript dynamically?

How to write normal text code using JavaScript dynamically?

The easiest way to do this task is by using innerHTML property in JavaScript. The innerHTML property sets or gets the contain within the desired element. The “innerHTML” keyword needs to be used to see its working.