JavaScript Program to Find whether a Number is Even or Odd with Source Code

preview_player
Показать описание
Welcome all, We will see JavaScript Program to Find whether a Number is Even or Odd with source. JavaScript to find Odd or Even number.

To find an entered number is Odd or Even is very simple, all you have to do is divide the number by 2 and if you get the remainder 0 (zero) then it is an Even number otherwise an Odd number.

Source Code:
_____________________________________________
var num = +prompt("Enter any Number");

if (num % 2 === 0) {
} else if (num % 2 === 1) {
}
_____________________________________________

Guys, Please support my channel by SUBSCRIBE to my channel and share my videos .
Рекомендации по теме
welcome to shbcf.ru