0

How to make a program of even and odd in javascript

I don't know how to apply becoz i m new here

4th Jul 2020, 7:11 AM
Muskan
4 Respuestas
+ 3
Muskan 10 % 2 == 0 //even 11 % 2 == 1 //odd Just apply this using if else statement.
4th Jul 2020, 7:14 AM
A͢J
A͢J - avatar
+ 1
Var t; t=10; if(t%2==0){ Document.write(“even”); } Is that method is okay??
4th Jul 2020, 7:18 AM
Muskan
+ 1
Muskan Yes
4th Jul 2020, 7:21 AM
A͢J
A͢J - avatar
0
Thanks for the cooperation
4th Jul 2020, 7:22 AM
Muskan