29 September 2021

A Lagninappe JS supports multiline strings. Just use the `` as you would for a format string.

Replacing Text and HTML in an Element

Sometimes you will want to alter text or HTML inside of a page's element. Here is how to replace text.


    let element = document.getElementById("someId");
    element.innerText = "new text";

Here is how to replace HTML.


    let element = document.getElementById("someId");
    element.innerHTML = "new HTML";