how i can edit an element with new text in javascript code example
Example 1: change text of element js
document.getElementById("p1").innerHTML = "New text!";
Example 2: javascript element edit text
// example:
document.querySelector(`.message`).textContent = `New Message`;
// syntax:
// document.querySelector(`.<class-name>`).textContent = `<new-value>`;