Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
consoleEx.html 517 B
<!doctype html>

<head>
    <meta charset="utf-8" />
    <title>JS Example</title>
</head>

<body>
    <script>
        var v1 = prompt("Enter value");

        console.log("First value entered: " + v1);
        var v2 = Number(prompt("Enter positive value"));
        if (v2 < 0) {
            console.error("Negative value provided.");
        } else {
            console.info("Positive value provided");
        }
        console.warn("You should always start your projects early");
    </script>
</body>

</html>