Practice Companion

CS Interview Drill Trainer

Drill JavaScript fluency, code reading, tracing, Big-O, async, and comments-first problem solving with deterministic feedback.

0
completed
0
streak
0%
accuracy
Arrays/Level 1/Code/filter / modulo / arrays

Return only even numbers

Write a function named solution that receives an array of numbers and returns a new array containing only the even numbers.

function solution(nums) { ... }