← Back to Question List
JavaScript Quiz #17
Filter and Square Evens
What output results from this code?
📄 Code
1const nums = [1, 2, 3, 4, 5, 6, 7, 8];2const squaredEvens = nums3 .filter(n => n % 2 === 0)4 .map(n => n * n);5console.log(squaredEvens);