Which of the following is used to output data to the browser console in JavaScript?
a) console.output()
b) console.log()
c) output.console()
d) browser.log()
Answer:
b) console.log()
Explanation:
To output data to the browser’s console, you use the console.log()
method in JavaScript. This is useful for debugging and displaying information during development.
Example:
console.log("Hello, World!");