let input = prompt('What would you like to do: (New, List, Delete, Quit)');
while (input === "New") {
const newToDo = prompt("What would you like to 'ADD' to the list?");
} if (newToDo !== undefined) {
alert(`${newToDo} added to the list`);
}
I'm not going to explicitly write the code here as that would be a lost opportunity for learning. However, here are some starting points that would benefit you:
const for a variable whose value is expected to change.while loop. In order to resolve that, declare the variable prior to the loop.Initialize newToDo in top they it will available all over the scope
let newToDo;
while (input === "New") {
newToDo = prompt("What would you like to 'ADD' to the list?");
}
if (newToDo !== undefined)
{
alert(`${newToDo} added to the list`);
}