<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <title>Menulis ke dalam Jendela Browser dengan JavaScript</title>
</head>
<body>
    <script>
    // Cetak seuah pesan sederhana
    document.write("Halo dunia!"); // Prints: Halo dunia!
    
    // Cetak nilai variabel 
    var x = 10;
    var y = 20;
    var sum = x + y;
    document.write(sum); // Prints: 30
    </script>
</body>
</html>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.