Operators Flashcards
1
Q
+
A
Adds to numbers
x=2+y
2
Q
-
A
Subtracts
var z= x-y
3
Q
*
A
Multiplies
Var z = x*y
4
Q
/
A
Divide
Var z= x/y
5
Q
%
A
Finds remainder of division
Var z= x%y
6
Q
A
Checks if a number is less than the others
2<3
Evaluated to a Boolean value
7
Q
>
A
Checks if a number is greater than the others
2>3
Evaluated to a Boolean value
8
Q
<=
A
Is less than or equal to
x<=y
Evaluated to a Boolean value
9
Q
> =
A
Checks if a number is greater than or equal to
x>=y
Evaluated to a Boolean value
Can also be based of alphabetical order “when in a string”
aa
10
Q
==
A
Equality operator
11
Q
!=
A
Inequality operator
12
Q
===
A
Checks the equality between types
“2”==2;
True
“2”===2;
False