JavaScript – Change Text in Paragraph
To change the text in a paragraph using JavaScript, get reference to the paragraph element, and assign new text as string value to the innerHTML
property of the paragraph element.
Example
Conclusion
In this JavaScript Tutorial, we learned how to change the text in a paragraph using JavaScript.