if odd even javascript code example
Example 1: if odd js
function isEven(value) {
return !(value % 2)
}
Example 2: javascript even number
let isEven = (n) => !(n&1);
function isEven(value) {
return !(value % 2)
}
let isEven = (n) => !(n&1);