Check if a number is even or odd

PHOTO EMBED

Wed Jan 05 2022 11:30:18 GMT+0000 (UTC)

Saved by @desiboli ##javascript ##js

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

https://blog.devgenius.io/15-javascript-codes-you-will-always-need-e8569903dd1