HomeTracks
Explorer···
THEEBUG
Completed0/11
Score0
JSlesson5.js×
THEEBUGlesson5.js
1
function checkAge(age) {
2
if (age ______ 18) {
3
return "You can vote!";
4
}
5
return "Too young";
6
}
7
 
8
console.log(checkAge(20)); // "You can vote!"
9
console.log(checkAge(15)); // "Too young"
$[system] Theebug ready. Happy coding!
Code BlocksDrag blocks into the drop zones above
5 blocks available
>=
<=
===
!==
>
Game Panel
0:000 pts
Level 5 of 11Conditionals
0/1 slots correct
Objective
Add the right comparison operator to check if age is 18 OR older
Expected Output
"You can vote!"
"Too young"
Debug says:
The condition should be true when age is 18 OR older! Which comparison operator means "greater than OR equal to"? Not just greater than — equal counts too!
Debug the Worm