Code Adventure 🗡️
Embark on an epic coding journey! Help heroes, wizards, and adventurers by solving JavaScript challenges. Each puzzle teaches you programming concepts through engaging stories.
Level 1 of 8
easyThe Lost Treasure
🏴☠️ Captain JavaScript has lost his treasure! He remembers it's hidden at an even-numbered location. Help him check if a number is even to find his gold!
Your Mission:
Help the adventurer find the treasure by implementing a function that checks if a number is even.
Concept:Conditionals & Operators
Test Cases:
Input: [4]
Expected: true
isEven(4) should return true
Input: [7]
Expected: false
isEven(7) should return false
Input: [0]
Expected: true
isEven(0) should return true
Input: [-2]
Expected: true
isEven(-2) should return true
Adventure Progress:
1
2
3
4
5
6
7
8