Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
Please me to correct my code, that when you click a, you output alert("You won\n2 points") and when you click b, c you output al
let u = prompt("How many colors does a rainbow have? Š°). 7 b). 6 c). 8"); let n = ["a", "b", "c"]; if (n[0]==true){ alert("You won\n2 points"); } else { alert("You lose\n0 point"); }
3 Respostas
+ 3
let u = prompt("How many colors does a rainbow have?\n\nŠ°). 7\nb). 6\nc). 8");
if (u.toLowerCase() === "a" )
{
alert("You won\n2 points");
}
else {
alert("You lose\n0 point");
}
+ 1
Ipang, thank you, I've already wrestle my brain over this task)
0
No worries,
You'll get the hang of it š