+ 3

CHALLENGE:Write a code which outputs whether a given number is even or odd.

This challenge is mainly for those who know Javascript. Also, please provide the link so that I can comment.

5th Dec 2017, 1:19 PM
Olam
Olam - avatar
6 ответов
5th Dec 2017, 1:32 PM
Akash Pal
Akash Pal - avatar
5th Dec 2017, 1:24 PM
#RahulVerma
#RahulVerma - avatar
+ 1
https://code.sololearn.com/W4xKYj1oK80g/?ref=app I think it's the correct answer.
5th Dec 2017, 1:21 PM
Olam
Olam - avatar
0
here it goes let num = prompt('Enter the number:'); var check = num%2==0?1:0; if(check) alert("Number is even"); else alert("Number is odd");
5th Dec 2017, 1:30 PM
RZK 022
RZK 022 - avatar
7th Dec 2017, 9:15 PM
Jonathan Álex
Jonathan Álex - avatar
9th Dec 2017, 3:09 PM
Jonathan Álex
Jonathan Álex - avatar