<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <title>Menulis ke dalam Kotak Dialog Peringatan dengan JavaScript</title>
</head>
<body>
    <script>
    // Tampilkan pesan sederhana
    alert("Halo dunia!"); // Outputs: Halo dunia!
    
    // Tampilkan nilai variabel 
    var x = 10;
    var y = 20;
    var sum = x + y;
    alert(sum); // Outputs: 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.