The point of this code is to get it to populate in and ordered list after the user enters the grocery list value. I need it to list as:
1. Milk
2. Deodarant
3. soda
4. chips
Also, if the user enters q or Q without entering items I need the page to read : "Sorry, your grocery list is empty. Any and all assistance will be appreciated!
document.write('<h1>My Grocery List</h1>');
var groceries = getGroceries();
printGroceries(groceries);
function getGroceries() {
var canExit = false;
var items = []
do {
items = prompt("Enter an item to add to the grocery list