1function isEven(n) {
2 return n % 2 == 0;
3}
4
5function isOdd(n) {
6 return Math.abs(n % 2) == 1;
7}
1function evenOrOdd(num) { //for string length take string
2 if (num % 2 == 0) {//and replace numm with string.length here
3 return "even";
4 } else {
5 return "odd";
6 }
7}
1for(let count =0; count<=100;count++){
2 count%2==0? console.log(`${count} is even`):console.log(`${count} is odd`);
3 ;
4}