Can someone help me with this problem?
Write a function called `isEven` that returns a boolean of whether or not a value is even or odd. The `isEven` function should not print anything out or return a number. It should only take in a number and return a boolean.
For example, if you made a call like
var isEvenNumber = isEven(4);
isEvenNumber should have the value true.
Once you’ve written this function, write a program that asks the user for integers and prints whether the number they entered is even or odd using your isEven function. You should let the user keep entering numbers until they enter the SENTINEL.
Here is a sample run of the program:
Enter a number: 5
Odd
Enter a number 42
Even
Enter a number: -6
Even
Enter a number: 0
Done!
Write a function called `isEven` that returns a boolean of whether or not a value is even or odd. The `isEven` function should not print anything out or return a number. It should only take in a number and return a boolean.
For example, if you made a call like
var isEvenNumber = isEven(4);
isEvenNumber should have the value true.
Once you’ve written this function, write a program that asks the user for integers and prints whether the number they entered is even or odd using your isEven function. You should let the user keep entering numbers until they enter the SENTINEL.
Here is a sample run of the program:
Enter a number: 5
Odd
Enter a number 42
Even
Enter a number: -6
Even
Enter a number: 0
Done!