Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (25 sloc) 673 Bytes
// Arithmetic Operators (Addition, Subtraction, Multiplication, Division)
50 + 3
50 - 3
50 * 3
50 / 3
// Division and Multiplication carry the same precendence and come before Addition and Subtraction. + and - also carry the same precedence
// Examples of precendence property below
25 / 5 * 2
// Applied left to right
(25 / 5) * 2
25 / 5 + 2
25 * 5 + 2
10 - 5 + 5
(10 - 5) + 5
10 - (5 + 5)
// Special numbers to consider
% //Stands for modulo or remainder
100 % 10
10 % 8
Infinity //Self implied
Infinity - 800
Infinity - 10
NaN // Stands for "not a number" - a number type that doesn't output a definitive result
0 / 0
Infinity - Infinity = ?