Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var todo=[];
- var answer=prompt("what do you want to do?");
- while (answer!=="quit") {
- if (answer=="list") {
- console.log(todo);
- }
- else if (answer="new") {
- var newtodo=prompt("what do you want to add?");
- todo.push(newtodo);
- }
- }
- alert("ok we're done here");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement