Guest practice: this set is not saved and does not count.
What does this log?
let score = 95; if (score >= 90) { console.log("A"); } if (score >= 80) { console.log("B"); } if (score >= 70) { console.log("C"); }
A
B
C
An if...else if chain must always end with an else.
if...else if
else
Here, 0 and 6 both run the same block:
switch (day) { case 0: case 6: console.log("weekend"); break; default: console.log("weekday"); }
This is meant to check for a teenager. What does it log?
let age = 50; console.log(13 <= age <= 19);
let name = ""; console.log(name || "Anonymous");
Click a question to go back and check it. After you submit, you will see the right answer and an explanation for every question. As a guest, nothing is saved.
Check my answers