showing results for - "javascript check if a number is even or odd"
Fynn
24 Jan 2018
1const isEven = num => num % 2 === 0;
2
3console.log(isEven(2)); 
4// Result: True
5
queries leading to this page
check if number is even or odd javascriptif number is even jshow to find odd number in javascriptcheck if a number is even or odd javascriptjavascript check odd numberhow to check if even number jshow to find out if a variable in javascript is even or oddcheck if number is odd javascripthow to tell if a number is even javascriptfind if number is even javascriptcheck if number is odd jsjs find odd numbercheck if num is odd jsjavascript determine if number is evenhow to check if num is even jsjs determining if a number is odd or evencheck if number is even or odd using jsjavascript how to check if a number is evencheck if number is odd in html using scriptjs check if number is oddif value is odd jsjs check if num is oddcheck if odd or even javascripthow to check if number is odd jsjavascript program to check whether a given number is even or oddsee if name is odd or even in a string using if statements in javascriptchecking for odd number in javascriptcheck if index is even or odd jscheck if number is even in javascriptjs determining if a number is odd or even in input fieldhow to check if a number is even or odd in jshow to check if a number is even in javascriptfind odd numbers in javascriptcheck if even or odd jshow to get odd even count jsjquery check number is even or oddcheck if number is even jsjs odd or evenjs check if number is evenhow to check if number is even jscheck even or odd in javascriptdisplay even and odd numbers in javascriptjavascript odd number testerif number is even nodejshow to know if number is odd in jsfind out if number is odd jscheck for even number javascriptjavascript check if a number is odd or evenjavascript get odd numberhow to now even numbers odd number javascriptjavascript check if a number is even or odd