let div = document.createElement("div") div.append("Some text") console.log(div.textContent) // "Some text"