Filter Even Numbers
Given an array of numbers, use the
Hint: You can check if a number is even by using the modulus operator:
filter
method to return only the even ones. Store the result in the evenNumbers
variable.Hint: You can check if a number is even by using the modulus operator:
num % 2 === 0
.Premium
JavaScript
Console