Thank you for your reply.
I renamed the num variable given in the b) and the code is working now. I am not quite sure if the code is working properly, though.
For refference i am gonna paste the instructions:
"a) Create a program that takes a number as input from the user, and prints all
numbers from 0 up to this number (hint: while …).
b) Expand the program with a new while loop that requests input from the user for
each “round”. When the user enters the number 10, the program must end. "
The given code in the solution executes as following: a window pops up requesting a number. First time, when you enter any given number, it prints out in the console all numbers from 0 up to the chosen number. If you havent chosen number 10 the browser asks you again for a number with a pop-up. When you enter the second number(different than 10), the browser again asks you for another number via pop-up (and doesnt print the numbers from 0 to chosen number to the console)//this is where i understand there is a mistake - as i am understanding the instructions, the program should repeat each round, so each time a user enters a number different from 10 the program should print all numbers from 0 up to the chosen number - meaning each round it should print numbers from 0 to chosen number(if it is different than 10). The code given in the solution prints the numbers from 0 up to the chosen number only first time.