Download to read offline








JavaScript can display output in HTML elements using innerHTML, in the HTML output using document.write(), in alert boxes using window.alert(), and in the browser console using console.log(). It demonstrates writing the result of 5 + 6 into an HTML paragraph element using innerHTML, into the HTML output using document.write(), into an alert box using window.alert(), and into the browser console using console.log() for debugging purposes. The document explains different methods for displaying data in JavaScript.








Presentation introduction by Prof. Neeraj Bhargava and Kapil Chauhan from MDS University.
JavaScript can display data via innerHTML, document.write(), window.alert(), and console.log() methods.
JavaScript accesses HTML elements using document.getElementById(id) and manipulates content with innerHTML.
Demonstration of using innerHTML to display the result of 5 + 6 in an HTML element.
Conveniently testing JavaScript code with document.write() to output 5 + 6 directly to the HTML.
Using the window.alert() method in JavaScript to show a result of 5 + 6 in an alert box.
Utilizing console.log() in JavaScript for debugging purposes to display the output of calculations in the console.
An assignment task to explain JavaScript display possibilities using suitable examples for each method.