Even or Odd checker
Even or Odd checker in HTML coding
HTML
function isDivisibleBy2(num) {
if (num % 2 === 0) {
console.log(`even`);
} else {
console.log(`odd`);
}
}
// Example usage
const number = 16;
isDivisibleBy2(number); // Output: 13 is not divisible by 2.