Check if a number is even or odd

PHOTO EMBED

Mon Jan 25 2021 14:11:00 GMT+0000 (Coordinated Universal Time)

Saved by @aymanelya #javascript

const isEven = num => num % 2 === 0;
console.log(isEven(2));
// Result: true
console.log(isEven(3));
// Result: false
content_copyCOPY

https://medium.com/dailyjs/13-javascript-one-liners-thatll-make-you-look-like-a-pro-29a27b6f51cb