Operators Flashcards

1
Q

What’s the symbol for arithmetic operator modulus? It’s action?

A

Percent sign. It will return the division remainder.

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

What’s the symbol for arithmetic operators increment and decrement? It’s action?

A

Two plus signs (will add by 1); two minus signs (will subtract by 1).

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

Explain what these assignment operators (+= or -= or *= or /= or %=) are saying when used here like x += y

A

x = x + y OR x = x % y

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

What’s the difference b/w the comparison operators == (or !=) and === (or !==)?

A

The first is comparing to see if the values are equal (or not equal) and the second is comparing both value and data type.

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

What are 3 logical operators?

A

And &&, or ||, not !

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

What are 2 type operators and what do they do?

A

typeof returns the type of a variable; instanceof returns true if an object is an instance of an object type

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

In this expression, which is the operator and which is the operand? 100 + 50

A

100 and 50 are the operands, and + is the operator.

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