<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <title>JavaScript Tipe Data String</title>
</head>
<body>
    <script>
    // Buat variabel
    var a = 'Halo semua!';  // menggunakan single quotes
    var b = "Halo semua!";  // menggunakan double quotes
    
    // Cetak nilai variabel
    document.write(a + "<br>");
    document.write(b);
    </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.