Folks, folks! Stop it. Several people have proposed the same silly
solution here.
Code that looks like this:
if (anything) then set something to true
else set something to false.
It's the equivalent of doing this:
if x is 1 then set y to 1
else if x is 2 then set y to 2
else if x is 3 then set y to 3
etc., when what you really want is just this:
set y to x
In this case, you can just do this:
set myPage to (y mod 2 is 1)
Now, as Michelle points out, you can also take advantage of the fact
that if you cast a number to a boolean, the result is true if the
number is not zero. Because of that, her version also works:
set myPage to (y mod 2 as boolean)
Either way. The important thing is that there's no need to use an if
test of the goal is to assign the results of that test to a Boolean
variable.