Introduction to JavaScript - document.write and console.log (example 2)

by danielkwood

HTML

<html>
    <head>
        <title>Intro to JavaScript</title>

        <script src="script.js"></script>
    </head>

    <body>
        
    </body>
</html>

JavaScript

// This code will display a Hello World message
console.log("Hello world");
document.write("Hello world");

// This is a single line comment

/*
 This is
 a multi-line
 comment.
*/