JavaScript Program to Check Whether Given Number is Even or Odd Number Using Ternary Operator

Write a JavaScript program to check whether given number is even or odd number using ternary operator.

Source Code
    <title>Check Even Odd Number Using Ternary Operator</title>
    var a = parseInt(prompt("Enter number"));
    (a%2==0) ? alert("EVEN NO.") : alert("ODD NO.");

"Coding Hub - Learn to code" app now available on Google Play Store