Dpinkston91
Baseband Member
- Messages
- 31
- Location
- Arkansas City, KS
Could anybody tell me why the 'alert()' works and functions correctly where it's at, but when I replace 'alert()' with 'console.log'... console.log does not display in the console? I do not understand this.
Here is my code:
const myToDo = ['Cook', 'Study', 'Work']
let input = prompt('What would you like to do: (New, List, Delete, Quit)'); //let input = prompt starts our whole 'to-do' list function.
while (input === "New") {
let newToDo = prompt("What would you like to 'ADD' to the list?");
if (newToDo !== undefined) {
alert(`${newToDo} added to the list.`);
}
}
Here is my code:
const myToDo = ['Cook', 'Study', 'Work']
let input = prompt('What would you like to do: (New, List, Delete, Quit)'); //let input = prompt starts our whole 'to-do' list function.
while (input === "New") {
let newToDo = prompt("What would you like to 'ADD' to the list?");
if (newToDo !== undefined) {
alert(`${newToDo} added to the list.`);
}
}