Even or odd


#1

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:


#2

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


#3

Our school is stupid but I have finally found it thanks


#4

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


#5

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


#6

maybe it's too slow:grinning: