Javascript print: Difference between revisions

From wikinotes
(Created page with "javascript is built for a browser, and does not have a <code>print</code> or <code>printf</code> command. You can write data in a few places * <code>console.log()</code> writes to the browser console * <code>window.alert()</code> writes to an alert box * The DOM also has several items you can write to")
 
(No difference)

Latest revision as of 12:11, 5 February 2023

javascript is built for a browser, and does not have a print or printf command.

You can write data in a few places

  • console.log() writes to the browser console
  • window.alert() writes to an alert box
  • The DOM also has several items you can write to