-
For displaying data in JavaScript, we can’t use ____________.
-
- innerHTML
- document.getElementById()
- console.log()
- document.write()
- None of these
Correct Option: B
We can display data in many ways in JavaScript.They are innerHTML, console.log(), window.alert(), document.write. document.getElementById(id) is a method used for accessing HTML element by JavaScript. Here id defines the HTML element.