Operators Flashcards
(7 cards)
What’s the symbol for arithmetic operator modulus? It’s action?
Percent sign. It will return the division remainder.
What’s the symbol for arithmetic operators increment and decrement? It’s action?
Two plus signs (will add by 1); two minus signs (will subtract by 1).
Explain what these assignment operators (+= or -= or *= or /= or %=) are saying when used here like x += y
x = x + y OR x = x % y
What’s the difference b/w the comparison operators == (or !=) and === (or !==)?
The first is comparing to see if the values are equal (or not equal) and the second is comparing both value and data type.
What are 3 logical operators?
And &&, or ||, not !
What are 2 type operators and what do they do?
typeof returns the type of a variable; instanceof returns true if an object is an instance of an object type
In this expression, which is the operator and which is the operand? 100 + 50
100 and 50 are the operands, and + is the operator.