JavaScript Output

In JavaScript web development, showing data in the browser helps with debugging and also provides users with reports and useful information.

In JavaScript there are many different “ways” to display data:

  • Writing into an HTML element, using innerHTML or innerText.
  • Writing into the HTML output using document.write().
  • Writing into an alert box, using window.alert().
  • Writing into the browser console, using console.log().