Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Javascript and arrays

Javascript and arrays

Scheduled Pinned Locked Moved JavaScript
javascriptbeta-testingcode-reviewlearning
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11082114
    wrote on last edited by
    #1

    struggling to figure out this program. beginner javascript programmer. My task is to write a program that does this: Stores the 50 states' names and capitals in two arrays (which I have). Uses the window.prompt() method to display a state name, asks the user to enter the matching capital name, and tells the user that entering "exit" will stop the program. Checks the user input and use the window.prompt() method to tell the user if the answer is correct or not. At the same time, the window.prompt() method displays the next state name, and asks the user to enter the next matching capital name. Please note that giving the user feedback and prompting the user to try the next are done with the same window.prompt(). Uses a loop to go through all 50 states until all 50 states have been displayed or the user enters "exit". Any guidance would be much appreciated. Even just getting pointed in the right direction. I've read through many tutorials and just can't seem to get it. Thank you.

    Kornfeld Eliyahu PeterK L S 3 Replies Last reply
    0
    • U User 11082114

      struggling to figure out this program. beginner javascript programmer. My task is to write a program that does this: Stores the 50 states' names and capitals in two arrays (which I have). Uses the window.prompt() method to display a state name, asks the user to enter the matching capital name, and tells the user that entering "exit" will stop the program. Checks the user input and use the window.prompt() method to tell the user if the answer is correct or not. At the same time, the window.prompt() method displays the next state name, and asks the user to enter the next matching capital name. Please note that giving the user feedback and prompting the user to try the next are done with the same window.prompt(). Uses a loop to go through all 50 states until all 50 states have been displayed or the user enters "exit". Any guidance would be much appreciated. Even just getting pointed in the right direction. I've read through many tutorials and just can't seem to get it. Thank you.

      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu Peter
      wrote on last edited by
      #2

      Member 11116351 wrote:

      My task

      So start do it! Do not wait for us to do it for you! Thing are work a bit differently. YOU came with some (probably imperfect) solution and WE help you make it work...

      I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

      1 Reply Last reply
      0
      • U User 11082114

        struggling to figure out this program. beginner javascript programmer. My task is to write a program that does this: Stores the 50 states' names and capitals in two arrays (which I have). Uses the window.prompt() method to display a state name, asks the user to enter the matching capital name, and tells the user that entering "exit" will stop the program. Checks the user input and use the window.prompt() method to tell the user if the answer is correct or not. At the same time, the window.prompt() method displays the next state name, and asks the user to enter the next matching capital name. Please note that giving the user feedback and prompting the user to try the next are done with the same window.prompt(). Uses a loop to go through all 50 states until all 50 states have been displayed or the user enters "exit". Any guidance would be much appreciated. Even just getting pointed in the right direction. I've read through many tutorials and just can't seem to get it. Thank you.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Start at http://www.w3schools.com/js/default.asp[^]. If you really cannot understand it from there then it's time to talk to your teacher and expalin what your problem is.

        1 Reply Last reply
        0
        • U User 11082114

          struggling to figure out this program. beginner javascript programmer. My task is to write a program that does this: Stores the 50 states' names and capitals in two arrays (which I have). Uses the window.prompt() method to display a state name, asks the user to enter the matching capital name, and tells the user that entering "exit" will stop the program. Checks the user input and use the window.prompt() method to tell the user if the answer is correct or not. At the same time, the window.prompt() method displays the next state name, and asks the user to enter the next matching capital name. Please note that giving the user feedback and prompting the user to try the next are done with the same window.prompt(). Uses a loop to go through all 50 states until all 50 states have been displayed or the user enters "exit". Any guidance would be much appreciated. Even just getting pointed in the right direction. I've read through many tutorials and just can't seem to get it. Thank you.

          S Offline
          S Offline
          Sunasara Imdadhusen
          wrote on last edited by
          #4

          Please do not post same question multiple times

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups