Array Filter Task

The Hacker has mixed Odds and Evens into one lump sum! Nobody can figure out which number is odd and which is even! That is, the Cybersquad can help - and you, too!

Click on the "Generate Random Numbers" button to generate a list of numbers. Try to come up with the answers on your own.

Once you're done, click on the "Filter Even Numbers" button to see the correct answer!


Math Fact

The command "number % 2 === 0" is no joke - it tells you what an even number is! If the number is divisible by 2 (if the number, when divided by 2, yields a remainder of 0), then that number is considered to be even. If not, then the number is odd.

An example is the number 10. 10 / 2 = 5, with a remainder of 0. Therefore, we can conclude that 10 is an even number.