Skip to content

Instantly share code, notes, and snippets.

@defields923
Forked from anonymous/index.html
Last active December 1, 2016 02:54
Show Gist options
  • Save defields923/e8981f13dee1c782ee96feac158e0472 to your computer and use it in GitHub Desktop.
Save defields923/e8981f13dee1c782ee96feac158e0472 to your computer and use it in GitHub Desktop.
NumbersNumbers studies// source https://jsbin.com/waseni
// -----Data Types: NUMBER---- //
/* Numbers are simply numeric values used for arithmetic.
Whole integers and fractional numbers using decimal points
are permitted. With numbers of exceptional size, scientific
notation using "e" (exponent) is allowed: */
// 2.998e8 = 2.998 × 10 to the 8th power = 299,800,000
// -----Using Numbers for Arithmetic----- //
var sum = 6 + 2;
console.log(sum); // logs 8
var subtraction = 6 - 2;
console.log(subtraction); // logs 4
var multiplication = 6 * 2;
console.log(multiplication); // logs 12
var division = 6 / 2;
console.log(division); // logs 3
var fracSum = 6.5 + 2.5;
console.log(fracSum); // logs 9
var remainder = 6 % 3;
console.log(remainder); // logs 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment