This while loop will only iterate once when run. If I replace prompt("Enter anything")
with a value, the loop functions properly. How can I use a prompt with a while loop and prevent it from breaking the loop?
var c = 0
while (c < 3) {
var p = prompt("Enter anything")
console.log([c, p])
c++
}