validar si un numero es par javascript foreach

Solutions on MaxInterview for validar si un numero es par javascript foreach by the best coders in the world

showing results for - "validar si un numero es par javascript foreach"
Liam
11 Apr 2019
1
2function consoleEven(arr) {
3  let data = arr.forEach((num) => (num % 2 === 0 ? num * 2 : num * 1))
4  console.log(data) // undefined
5}
6
7consoleEven(arr)
8
similar questions