Jump to content

tucker11

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About tucker11

  • Rank
    Newbie
  • Birthday 09/01/1977

Profile Information

  • Gender
    Male
  • Location
    United States
  1. I did some research and noticed exactly what you are saying. I think I got it. Thanks for the heads up!
  2. Is this the correct coding for console.log? document.write('<h1>My Grocery List</h1>'); var groceries = getGroceries(); printGroceries(groceries); function getGroceries() { var debug = true; var input = prompt ("Enable debugging (Y/N)", ""); if (input != "N" && input != "n") debug = true; if (debug) console.log("beginning script"); document.write('<h1>My Grocery List</h1>'); var items = []; do { var basket = prompt("Enter an item to add to the grocery list (enter ‘q’ to quit):"); if(basket != 'q' && basket != 'Q') items.push(ba
  3. How can I write my script to a web console (firefox) only when a create a boulean variable called debug set to equal true?
  4. Is there a way to put "your list is empty" in the external js file without linking to the html?
  5. Thank you, If the user picked q or Q how could i get the the script to respond saying "Your list is empty"v
  6. 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
×
×
  • Create New...