My even and odd number checker

Check out my awesome coding creation from

Source code:

const print = (str) => console.log(str);
const isEven = (real) => {
return real % 2 === 0 ? real + ’ Is even number’ : real + ’ Is odd number’;
}
const number = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10.1, 10.2, 10.3, 10.4, 10.5, 11.1, 11.2, 11.3, 11.4, 11.5]
for(var r=0; r < number.length; r++) {
print(isEven(number[r]));
}

1 Like