function evenOrOdd(number) { if(number % 2 == 0){ console.log("The number is even."); }else{ console.log("The number is odd."); } }
const number = prompt("Enter a number: ");if(number % 2 == 0){console.log("The number is even.");}else{console.log("The number is odd.");- function evenOrOdd(number) {
- if(number % 2 == 0){
- console.log("The number is even.");
- }else{
- console.log("The number is odd.");
- }
- }