JavaScript
JavaScript OutputJavaScript Output
JavaScript outputs data in four different ways.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
JavaScript does not have built-in print functions. Instead, developers output data by altering HTML elements, writing directly to the document, popping up alert boxes, or logging messages to the browser console.
Syntax
Syntax
Key Points
- `innerHTML` writes into HTML elements.
- `document.write()` writes to the HTML document.
- `window.alert()` creates a pop-up box.
- `console.log()` sends data to the developer tools.