javascript even number
function isEven(n) {
return n % 2 == 0;
}
function isOdd(n) {
return Math.abs(n % 2) == 1;
}if ( num % 2 == 0) {
alert('Even Number');
}else{
alert('Odd Number');
}
for(let count =0; count<=100;count++){
count%2==0? console.log(`${count} is even`):console.log(`${count} is odd`);
;
}let isEven = (n) => !(n&1);
Also in JavaScript:
- javascript tap and hold
- loop key in object
- js split array into smaller arrays
- javascript string to ascii array
- implement the remove property function
- inertia.js
- jquery keyup
- react component key prop
- aba translate js
- javascript tracking webcam
- node close rabbitmq connection
- js find space in string
- array reduce
- disable autocomplete in react fields
- react and bootstrap
- fetch post js
- close browser tab javascript
- show html file on nodejs code
- javascript hover event
- javascript find area of triangle
- vee validate check if no errors
- react native text wrap
- javascript moment
- angular http error handling