Web technologies Questions | JavaScript Course Quiz 2 | Question 6
What will be the output of the following code?
<script> let i = 30; if( i == 10 || i > 20){ console.log('Hola'); }else if( i == 5){ console.log('Breaking up the code'); }else{ console.log('Adios'); }</script> |
(A) Hola
(B) Breaking up the code
(C) Adios
(D) None of the above
Answer: (A)
Explanation: The if() statement will be executed if the condition in the bracket returns true otherwise the else statement is executed.
Quiz of this Question


