is the var inside the while loop necessary in the following loop.
hi everyone! question. is the var inside the while loop necessary in the following loop. I don't think so. Just asking.
var answer = prompt("are we there yet?");
while(answer.indexOf("yes") === -1) {
var answer = prompt("are we there yet?");
}
alert("YAY, WE MADE IT!!!");
what I mean is, you could use answer=prompt("are we there yet?"); to update the value of answer, right?
var answer = prompt("are we there yet?");
while(answer.indexOf("yes") === -1) {
var answer = prompt("are we there yet?");
}
alert("YAY, WE MADE IT!!!");
what I mean is, you could use answer=prompt("are we there yet?"); to update the value of answer, right?
No any search results
You already invited:
1 Answers
Benny
Upvotes from: