Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 330 Bytes

isEven.md

File metadata and controls

17 lines (13 loc) · 330 Bytes
title tags
isEven
math,beginner

Returns true if the given number is even, false otherwise.

  • Checks whether a number is odd or even using the modulo (%) operator.
  • Returns true if the number is even, false if the number is odd.
const isEven = num => num % 2 === 0;
isEven(3); // false