UNPKG
fast-odd-even
Version:
latest (1.0.0)
1.0.0
Is this odd or even, but it is *blazingly* fast ⚡
fast-odd-even
/
index.js
13 lines
(10 loc)
•
141 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
function
isOdd
(
num
) {
return
Boolean
(num &
1
); }
function
isEven
(
num
) {
return
!
isOdd
(num); }
module
.
exports
= { isOdd, isEven, };