The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

In appendix D, pages 503 and 504 I found a curious bit of code to determine if a number is odd or even. Page 503 shows this code:
if (x % 2 == 0) { console.log ('Even'); } else ....

My attempts using this code failed. Should it not be written as:
if (x/2==0) ?

A similar test appears on page 504. I apologize if the error is mine in not recognizing the use of %. I've never seen it used in this context.