Skip to content

Instantly share code, notes, and snippets.

@MirzaChilman
Created January 8, 2018 04:26
Show Gist options
  • Save MirzaChilman/8bc89f4913cb038cf0cfe6f651cf281e to your computer and use it in GitHub Desktop.
Save MirzaChilman/8bc89f4913cb038cf0cfe6f651cf281e to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<script type="text/javascript">
//=== PENGGUNAAN NUMBER ===
var a = 1;
var b = 2.5;
var z = a + b;
document.write('Hasil Number = '+ a + '+' + b + '=' + z);
document.write('<br>');
document.write('<br>');
//=== PENGGUNAAN String ===
var string1 = '1';
var string2 = '2';
var HasilString = string1 + string2;
document.write('\nHasil String = '+ string1 + '+' + string2 + '=' + HasilString);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment