Course: JavaScript

Progress (0%)

Conditions Quiz

Quiz 9 4 questions

Prerequisites for the quiz

  1. Whole JavaScript Conditions unit

Are you ready?

4 questions to solve

  1. This quiz goes to full-screen once you press the Start button.
  2. At the end of the quiz, you are able to review all the questions that you answered wrong and see their explanations.
Boolean(false) gets converted to...
false is simply the boolean false and hence will get converted to false. For more info refer to JavaScript Booleans.
Boolean("false") gets converted to...
Only empty strings with length 0 get converted to the boolean false. Likewise in this case the answer would be true.
We can have an else if statement without an if.
True or false?
if statement needs to precede else if and else statements. More at JavaScript if...else if...and else.
What does the following code log in the console?
var fruit = "orange";

switch (fruit) {
    case "orange":
    case "mango":
The value inside switch is matched against each case and if an identical match is found the corresponding code is executed.

"I created Codeguage to save you from falling into the same learning conundrums that I fell into."

— Bilal Adnan, Founder of Codeguage