Skip to content

Instantly share code, notes, and snippets.

@goodbedford
Last active April 2, 2016 14:10
Show Gist options
  • Save goodbedford/7bffaabac36397129cd255aadb0e1bcc to your computer and use it in GitHub Desktop.
Save goodbedford/7bffaabac36397129cd255aadb0e1bcc to your computer and use it in GitHub Desktop.
// arithmetic operators are your standard math operators
// we have addition + , subtraction - , multiplication * , division /, modulo/remainder %,
var a = 10;
var b = 5;
var c = 22;
// addition +
console.log("a + b =", a + b);
// subtraction -
console.log("a - b =", a - b);
// multiplication *
console.log("a * b =", a * b);
// division
console.log("a / b =", a / b);
// remainder %
console.log("c % a =", c % a);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment