Question 01 of 05

JavaScript Basics

Write a JavaScript program to display an alert message and write to the document.

C++
<!DOCTYPE html>
<html>
<body>
    <script>
        alert("Hello, World!");
        document.write("<h2>Welcome to JavaScript</h2>");
        console.log("This is a console message");
    </script>
</body>
</html>
Question 1 of 5