prgSRR
0
Q:

even number without mod

function testodd(num) {
  if((num & 1) == 0){
    return true
  }
  return false;
}

var output = testodd(17);
console.log(output); // --> false
var output = testodd(-16); 
console.log(output); // --> true
var output = testodd(0); 
console.log(output); // --> true
0

New to Communities?

Join the community