What I was able to find while looking through stackoverflow was that this is the best way to prompt a string and turn it into a number. Is this the best way? Thank you!
var age = prompt("Please enter your age:");
if (Number(age) < 18) {
alert("");
}
Aucun commentaire:
Enregistrer un commentaire