JavaScript: Filter evens #12
Ready — edit the code above and click Run.
console.log([...Array(16)].map((_,i)=>i+1).filter(x=>x%2===0));
Try solving on your own first, then reveal the official answer.
Array methods are core to JS interviews.