Writing into an HTML element, using innerHTML .Writing into the HTML output using document.write() .Writing into an alert box, using window.alert() .Writing into the browser console, using console.log() .
What are the ways to display data in JavaScript?
- Writing into an HTML element, using innerHTML .
- Writing into the HTML output using document.write() .
- Writing into an alert box, using window.alert() .
- Writing into the browser console, using console.log() .
How do you display output?
Answer: PRINT command is used to display output in the screen in Basic.