Even or odd


Hi. In the JavaScript lessons I need to know how to check if a number is even. Unfortunately my school blocks most help forums so I couldn't find it. Thanks in advance :smiley:


Why do they block the forums, but since you can access the codecademy, can't you find it here?


Our school is stupid but I have finally found it thanks


if you want to check if a number is even, maybe you can use the % module operator.....the % can access to the remainder ,you can use if statement,
for example:if num %2===0, then the num is even


Good you found it, i just wanted to check it wasn't for an exam or something important


maybe it's too slow:grinning: