|
if(isEven%2===0){
should be
if(number%2===0){
You are testing whether the number is odd/even, not the function!
It is dangerous to use number as the name of a variable - too easily confused with the Javascript method Number().
Quizmaster: In 1917 King George V changed the name of the British royal house from Saxe-Coburg Gotha to what?
Contestant: Tudor.
__________________
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Last edited by Philip M; 12-19-2012 at 01:01 PM..
|