operators Flashcards

1
Q

Modulus

A

% Modulus (division remainder)

x = y % 2 y = 5 x = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Modulus

A

% Modulus (division remainder)

x = y % 2 y = 5 x = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

increment

A

++ Increment

x = ++y y = 6 x = 6

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

decrement

A

– Decrement

x = –y y = 4 x = 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

=

A

x = y x = y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

+=

A

x += y x = x + y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

-=

A

x -= y x = x - y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

*=

A

x *= y x = x * y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

/=

A

x /= y x = x / y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

%=

A

x %= y x = x % y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

string operator

+

A

text3 = text1 + text2
text 1: Good
text 2: Morning
text 3: Good Morning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

string operator

+=

A

text1 += text2
text1 (before) : good
text2 : Morning
text1 (after): Good Morning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

==

A

equal to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

===

A

equal value and equal type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

!=

A

not equal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

!==

A

not equal value or not equal type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

>

A

greater than

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
A

less than

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

> =

A

greater than or equal to

20
Q

<=

A

less than or equal to

21
Q

Conditional (Ternary) Operator

A

variablename = (condition) ? value1:value2

voteable = (age < 18) ? “Too young”:”Old enough”;

22
Q

&&

23
Q

||

24
Q

!

25
increment
++ Increment x = ++y y = 6 x = 6
26
decrement
-- Decrement x = --y y = 4 x = 4
27
=
x = y x = y
28
+=
x += y x = x + y
29
-=
x -= y x = x - y
30
*=
x *= y x = x * y
31
/=
x /= y x = x / y
32
%=
x %= y x = x % y
33
string operator +
text3 = text1 + text2 text 1: Good text 2: Morning text 3: Good Morning
34
string operator +=
text1 += text2 text1 (before) : good text2 : Morning text1 (after): Good Morning
35
==
equal to
36
===
equal value and equal type
37
!=
not equal
38
!==
not equal value or not equal type
39
>
greater than
40
less than
41
>=
greater than or equal to
42
<=
less than or equal to
43
Conditional (Ternary) Operator
variablename = (condition) ? value1:value2 voteable = (age < 18) ? "Too young":"Old enough";
44
&&
and
45
||
or
46
!
not