Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This else if Statements worksheet is part of the JavaScript Coding without HTML and CSS journey. Print it as a booklet?
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1} else if (score >= 70) { ... } | AWrong - 'else if' needs a space between the words | |
| 2} else if (age < 18) { ... } | BChecks this condition only if the earlier if was false | |
| 3Adds another condition to check after an if | Cif / else if / else if | |
| 4Only one block in a chain of these runs | DWrong - 'else' must be lowercase | |
| 5} elseif (score >= 70) { ... } | Eelse if | |
| 6} Else if (age < 18) { ... } | FRuns its block only if age < 18 and the first if was false |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
else if — Checks another condition only when the previous if or else if condition was false.} else if (score >= 70) {if (age < 13) {
} else if (age < 18) {if (n === 1) {
} else if (n === 2) {} else if (temp > 30) {} else if (level === 2) {