Help with a While Loop

Hi, I don’t understand why, when I enter the number 10, the program doesn’t stop:

numb=0;
while(numb!=10){
let numb=Number(prompt("Enter a number: "));
conta=numb+1;
let i=0;
while(i<conta){
console.log(i);
i++;
}}
console.log(“Stop”);

The assignment of the exercise is this:

  1. Create a program that takes a number as input from the user, and prints all numbers from 0 up to this number (hint: while …).
  2. Expand the program with a new while loop that requests input from the user for each “round”.
  3. When the user enters the number 10, the program must end.

Thanks.

Ok, I solved. Just substitute var for let.
numb=0;
while(numb!=10){
var numb=Number(prompt("Enter a number: "));
conta=numb+1;
var i=0;
while(i<conta){
console.log(i);
i++;
}}
console.log(“Stop”);