js set text code example
Example 1: change text of element js
document.getElementById("p1").innerHTML = "New text!";
Example 2: set text of dom element
document.getElementById("myBtn").textContent = 'Hello World';
Example 3: inner content
document.getElementById("myBtn").textContent;
document.getElementById("myBtn").innerHTML;
document.getElementById("myBtn").innerText;
// js dont have innerContent