1 // Here we define a array variable to store user input values:
2 var arr=[];
3 /* Then we define a while loop for taking multiple values.
4 it takes the value and store the values into an array until
5 the condition is true.But when a user didn't give a value
6 or just give 'q'value short for quit then it breaks the loop
7 and logs the array into a console interface of webpage.*/
8 while(true){
9 var input=prompt("Enter the Numbers: ");
10 if(input== null || input== 'q')
11 {
12 break;
13 }
14 arr.push(Number(input));
15 }
16 console.log(arr);
17
18