operators Flashcards
1
Q
Modulus
A
% Modulus (division remainder)
x = y % 2 y = 5 x = 1
2
Q
Modulus
A
% Modulus (division remainder)
x = y % 2 y = 5 x = 1
3
Q
increment
A
++ Increment
x = ++y y = 6 x = 6
4
Q
decrement
A
– Decrement
x = –y y = 4 x = 4
5
Q
=
A
x = y x = y
6
Q
+=
A
x += y x = x + y
7
Q
-=
A
x -= y x = x - y
8
Q
*=
A
x *= y x = x * y
9
Q
/=
A
x /= y x = x / y
10
Q
%=
A
x %= y x = x % y
11
Q
string operator
+
A
text3 = text1 + text2
text 1: Good
text 2: Morning
text 3: Good Morning
12
Q
string operator
+=
A
text1 += text2
text1 (before) : good
text2 : Morning
text1 (after): Good Morning
13
Q
==
A
equal to
14
Q
===
A
equal value and equal type
15
Q
!=
A
not equal
16
Q
!==
A
not equal value or not equal type
17
Q
>
A
greater than
18
Q
A
less than