console
- console.log
The better way to see messages from the JavaScript running in the browser is to use the console.log() function and open the console.
- See the documentation of console
Open the console!
<script>
console.log("Hello World");
console.debug("A debug message");
console.info("An info message");
console.warn("A warning");
console.error("This is an error message");
</script>
To open the JavaScript console
- Chrome Mac: Command-Option-J
- Chrome Windows: Ctrl-Shift-J
- Firefox Mac: Command-Option-K
- Firefox Windows: Ctrl-Shift-K
- Internet Explorer: F12
- Safari: Command-Option-C
Run it with Node.JS
Run it in the editor