I need to have a bunch of numbers asked by prompt, depending on the number there's a message, kind of fortune cookies, but if the user enters a word it needs to say "You typed a word, we need a number", as well as if it is a negative number it will say "negative numbers won't work here"
I know how to do everything but I still can't figure out how to display this part
let number = +prompt("choose a number for good luck")
if (number ===NaN){
document.getElementById("fortuneOutput").innerHTML = "You typed a word, we need a number"
}
else if (number < 0){
document.getElementById("fortuneOutput").innerHTML = "negative numbers won't work here"
}
but none of them work