Modern alternatives to innerHTML and appendChild()

Marian Čaikovski
3 min readAug 14, 2021

Two methods making DOM manipulation less verbose.

append() is a convenient alternative to appendChild().

Like appendChild(), append() appends DOM nodes to an element, but unlike appendChild(), append() accepts multiple arguments of any types. The arguments that are not nodes are converted into strings that in turn…

--

--

Marian Čaikovski

Java, JavaScript and SQL developer. Interested in data collection and visualization.