JavaScript Examples

Before starting an example let us discuss how JavaScript can display the data. JavaScript ways of data display: 1. window.alert(): Display data in an alert box. 2. document.write(): Display data into the HTML output. 3. innerHTML: Display data into an HTML element. 4. console.log(): Display data into the browser console. Javascript in head tag example: … Read more