The better way to see messages from the JavaScript running in the browser is to use the console.log() function and open the console.

examples/intro/console_script.html
Open the console!
<script>

console.log("Hello World");

</script>

To open the JavaScript console

Run it with Node.JS

Run it in the editor