I put the following code, I only run one round
numero = prompt("Escribe un número")
var multiplica = numero * 2;
while (numero != "0") {
alert (numero*2);
}
I put the following code, I only run one round
numero = prompt("Escribe un número")
var multiplica = numero * 2;
while (numero != "0") {
alert (numero*2);
}
You have to put the prompt inside the while:
var numero;
while (numero != "0"){
numero = prompt("Escribe un número")
if (numero == 0) {
alert("Gracias");
} else {
var multiplica = numero * 2;
alert (numero*2);
}
}