Skip to content

Instantly share code, notes, and snippets.

@ceme
Created September 23, 2018 19:24
Show Gist options
  • Save ceme/2b55965c817b5880c0a08183151ea2d9 to your computer and use it in GitHub Desktop.
Save ceme/2b55965c817b5880c0a08183151ea2d9 to your computer and use it in GitHub Desktop.
Vanilla JS : Insert Text using Template Literal to DOM node
https://codepen.io/anon/pen/eLrxXV
<div id="out"></div>
let extra = 'you cwazy'
document.querySelector('#out').appendChild(document.createTextNode(`Ho there, ${extra}`))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment