+ 1

i need help with practice 4.2/even numbers/overview/javascript

4th Jan 2021, 12:55 PM
Mihalis Karalis
Mihalis Karalis - avatar
4 Respuestas
+ 2
//console.log("1. James") console.log("2. John") //console.log("3. Amy") console.log("4. Collin") //console.log("5. Tom") console.log("6. Lisa" Here is your answer Anything after // will be ignored so you have to remove // for even or odd number as per your question
11th Feb 2021, 9:24 AM
NIKHIL SONAWANE
NIKHIL SONAWANE - avatar
0
Sorry no one has responded to this yet. I’m guessing you question has been overlooked because there wasn’t enough info. Please explain in detail what you need help with. That is, if you still need help. Someone will try to assist you once more info is provided.
10th Jan 2021, 6:10 AM
Elizabeth Kelly
Elizabeth Kelly - avatar
0
/*There are 2 ways to go about this.. the first a more simple way as NIKHIL SONAWANE stated above I'll drop the tenny weeny complex and fun answer below.. */ Var user = prompt('Input Number'); Var Odd = (user%2 != 0) ? alert(`${user} is an Odd Number`) : alert(`${user} is an Even number`); /* the above simply uses a ternary operator to get an even/odd sequence I'm considering using it in the famous guy "fizzbuzz" challenge...🙂*/
5th Oct 2021, 3:22 AM
MICHAEL ADEBANJO
MICHAEL ADEBANJO - avatar
0
//console.log("1. James") console.log("2. John") //console.log("3. Amy") console.log("4. Collin") //console.log("5. Tom") console.log("6. Lisa") Good Luck
25th Jan 2022, 2:58 AM
Muhammad Alif Deva Rizqon
Muhammad Alif Deva Rizqon - avatar