JavascriptDOM Manipulation

The Document Object Model (DOM) is a programming interface for HTML documents. JavaScript can select, modify, add, or delete HTML elements dynamically by manipulating the DOM. This capability powers interactive interfaces like content updates without page reloads, animations, and event handling.

const heading = document.querySelector('h1');
heading.textContent = 'Hello from JavaScript!';