JavaScript-Conditional statements
* Required
Email address
*
Your email
Which is the correct syntax of using if…statement in JavaScript?
*
1 point
if: X>Y {code}
if (X>Y){code}
IF (X>Y)[code]
Choose the correct option:
1 point
else if (condition) {code}
elseif (condition) {code}
elseIf [condition2] {code}
Clear selection
Predict the output if a=78
*
1 point
No Output
Expensive
Not Expensive
The statement if(d==1)will perform one of the following:
*
1 point
Display an error message
Check ‘d’ for a value of 1 and performs an action if it matches
Assign the variable ‘d’ the value 1
Which operator is used for ‘not equal to’ in JavaScript?
*
1 point
#
!=
<>
The conditional statement used when only true part has to be checked only.
*
1 point
if…else
if…elseif
if statement
Which operator is used to represent logical ‘AND’?
*
1 point
&&
&
||
A Data type that represents value either false or true.
*
1 point
String
bool
boolean
Submit
This form was created inside of Mount Carmel School.
Report Abuse
Forms