Javascript Check a Number is Even or Odd
JavaScript checks whether a given number is even or odd.
const isEvenOdd = n => ( n & 1 ) ? "Odd" : "Even";
let result = isEvenOdd(18);
console.log(result); // Even
Md Obydullah
Software Engineer | Ethical Hacker & Cybersecurity...
Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.