WEEK 11 Flashcards
(25 cards)
___ are symbols that are used to perform operations on operands.
JavaScript operators
___ used to perform arithmetic operations on the operands.
JavaScript Arithmetic Operators
Operators in Javascript:
- Arithmetic Operators
- Comparison (Relational) Operators
- Bitwise Operators
- Logical Operators
- Assignment Operators
- Special Operators
Arithmetic Operators:
- Addition
- Subtraction
- Multiplication
- Division
- Modulus (Remainder)
- Increment
- Decrement
The __ compares the two operands.
JavaScript comparison operator
___ perform bitwise operations on operands.
JavaScript Bitwise Operators
JavaScript comparison operator
- == (Is equal to)
- === (Identical)
- != (Not equal to)
- !== (Not identical)
- > (Greater than)
- < (Less than)
- > = (Greater than or equal to)
- <= (Less than or equal to)
The bitwise operators are as follows:
- & (Bitwise AND)
- | (Bitwise OR)
- ^ (Bitwise XOR)
- Bitwise NOT
- «_space;(Bitwise Left Shift)
- > > (Bitwise Right Shift)
- > > > (Bitwise Right Shift with Zero)
The following operators are known as
JavaScript logical operators.
- && (Logical AND)
- || (Logical OR)
- ! (Logical NOT)
The following operators are known as
JavaScript assignment operators.
- = (Assign)
- += (Add and assign)
- -= (Subtract and assign)
- *= (Multiply and assign)
- /= (Divide and assign)
- %= (Modulus abd assign)
The following operators are known as
JavaScript special operators.
- (?;)
- ,
- delete
- in
- instanceof
- new
- typeof
- void
- yield
Conditional operator returns value based on the condition. It is like if-else
(?:)
Comma operator allows multiple expressions to be evaluated as single statement
,
Delete operator deletes a property from the object.
delete
Checks if the object is an instance of given type.
instanceof
Creates an instance (object)
new
Checks the type of object.
typeof
It discards the expressionʼs return value.
void
Checks what is returned in a generator by the generatoʼs interator.
yield
In operator checks if object has the given property
in
The ___ is used to execute the code whether condition is
true or false.
JavaScript if-else statement
There are three forms of if statement in JavaScript.
- If Statement
- If else statement
- if else if statement
It evaluates the content only if expression is true.
JavaScript If statement
It evaluates the content whether condition is
true of false.
JavaScript If…else Statement