How to make a while loop keep on running with prompts?


#1




What this code should do is keep on running as long as I input prompts greater than one. However, it just finishes the code. Help?


var espanol = prompt("Why world")
while (prompt.length >=1) {
    var hope = prompt("reasons")
}
test = prompt("Anything else?")


#2

prompt.length? the prompt is stored in hope, you shoud use hope.length


#3

Wow.
Tunnel vision ftw


#4

Thanks a lot for the help


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.