Document Object

  • The global document object is an entrypoint to the DOM
  • Gives you global properties and methods that let JavaScript ask "questions" about the page
  • Lets you create new elements "from scratch"
  • Gives methods to access elements on the page
const tabTitle = document.title;
const currentUrl = document.location.href;
const newHeading = document.createElement("h1");

7 / 12