js paragraph text code example
Example 1: change text of element js
document.getElementById("p1").innerHTML = "New text!";
Example 2: access paragraph text in javascript
var x =
document.getElementById("myBtn").textContent;
document.getElementById("p1").innerHTML = "New text!";
var x =
document.getElementById("myBtn").textContent;