function checkEvenOrOdd(number) {if(number % 2 === 0) {console.log(number + " is even.");} else {console.log(number + " is odd.");}}
// Пример использованияcheckEvenOrOdd(5); // Output: 5 is odd.checkEvenOrOdd(10); // Output: 10 is even.
function checkEvenOrOdd(number) {
if(number % 2 === 0) {
console.log(number + " is even.");
} else {
console.log(number + " is odd.");
}
}
// Пример использования
checkEvenOrOdd(5); // Output: 5 is odd.
checkEvenOrOdd(10); // Output: 10 is even.