Created
September 23, 2018 19:24
-
-
Save ceme/2b55965c817b5880c0a08183151ea2d9 to your computer and use it in GitHub Desktop.
Vanilla JS : Insert Text using Template Literal to DOM node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://codepen.io/anon/pen/eLrxXV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="out"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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