+ 1
Can someone explain what promt is in the code and its meaning?
// if-else if var age = prompt ("Please enter your age."); if (age <= 12) { document.write("You are a child."); } else if (age <= 18) { document.write("You are a teenager.") } else if (age > 18) { document.write("You are getting old.") } else { document.write("You did not enter an age.") }
1 Resposta
+ 2
prompt asks for an input.
It 'promts' you for input.