<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <title>Operator String JavaScript</title>
</head>
<body>
    <script>
    var str1 = "Halo";
    var str2 = "Dunia!";
    
    document.write(str1 + str2 + "<br>"); // Outputs: Halo Dunia!
     
    str1 += str2;
    document.write(str1); // Outputs: Halo Dunia!
    </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.