Skip to content

Instantly share code, notes, and snippets.

@marcusp619
Created June 4, 2019 21:18
Show Gist options
  • Save marcusp619/10a186b0991e3183daee5c10ae8a8ff4 to your computer and use it in GitHub Desktop.
Save marcusp619/10a186b0991e3183daee5c10ae8a8ff4 to your computer and use it in GitHub Desktop.
wbZWXM
<h1>DOM Maniupulation</h1>
// Make a new element
const myElement = document.createElement('h1');
// add some text to that element
// myElement.innerHTML = "Lorem ipusm";
myElement.textContent = "Lorem ipsum"
// we append that element to the DOM
const theBody = document.querySelector('body')
theBody.appendChild(myElement)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment