I'm currently working on a task that involves prompting the user to input random numbers until they enter "-1". Once this condition is met, I need to calculate the average of all the numbers entered excluding "-1". So far, here's what my code looks like:
var userInput;
while (userInput !== "-1") {
userInput = prompt("Enter a number");
}
numbersList = [userInput];
console.log(numbersList);