- Mention different operators that can be used in JavaScript.
We've talked about arithmetic operators, comparison operators, and logical operators in JavaScript.
- Write down the syntax of else if statement.
if (/* condition */){
// Do this if the condition is true
} else {
// Do this if the condition is false
}
- In JavaScript which operator has the highest precedence?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence I googled it. I think the grouping operator,
( )
, or parentheses has the highest pecedence.
- What is the difference between
=
and==
operator?
=
is an assignment operator==
is the Equal comparison operator.
- How do you declare a Boolean in JavaScript?
Assign
true
orfalse
, no quotation marks.