Hackerss.com

hackerss
hackerss

Posted on

Javascript Imprimir si un numero es par


//function to check if a number is even
function isEven(num) {
  // return true if num is even
  return num % 2 === 0;
}

//example
const result = isEven(2);

//output
console.log(result); //true


Enter fullscreen mode Exit fullscreen mode

Top comments (0)