Skip to content

Instantly share code, notes, and snippets.

@desawarna
Last active July 26, 2018 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desawarna/6247fe91073677edc44150c0736f7a7e to your computer and use it in GitHub Desktop.
Save desawarna/6247fe91073677edc44150c0736f7a7e to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<head>
<title>Operator Aritmatika</title>
</head>
<body onload="kata()">
<script>
//Variabel
var A = 10, B = 4;
//Penambahan
document.write("Hasil dari 10 % 4 = ");
C = A % B;
document.write(C);
document.write("<br/>");
// Penambahan increment
document.write("Hasil dari 10++ = ");
A++;
document.write(A);
document.write("<br/>");
// Pengurangan
document.write("Hasil dari 10 - 4 =");
// Variabel
C = A-B;
// Dalam Kurung Argument
document.write(C)
document.write("<br/>");
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment