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

&&

A

and

23
Q

||

A

or

24
Q

!

A

not

25
Q

increment

A

++ Increment

x = ++y y = 6 x = 6

26
Q

decrement

A

– Decrement

x = –y y = 4 x = 4

27
Q

=

A

x = y x = y

28
Q

+=

A

x += y x = x + y

29
Q

-=

A

x -= y x = x - y

30
Q

*=

A

x *= y x = x * y

31
Q

/=

A

x /= y x = x / y

32
Q

%=

A

x %= y x = x % y

33
Q

string operator

+

A

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

34
Q

string operator

+=

A

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

35
Q

==

A

equal to

36
Q

===

A

equal value and equal type

37
Q

!=

A

not equal

38
Q

!==

A

not equal value or not equal type

39
Q

>

A

greater than

40
Q
A

less than

41
Q

> =

A

greater than or equal to

42
Q

<=

A

less than or equal to

43
Q

Conditional (Ternary) Operator

A

variablename = (condition) ? value1:value2

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

44
Q

&&

A

and

45
Q

||

A

or

46
Q

!

A

not