www.webdeveloper.com
Results 1 to 2 of 2

Thread: javascript (student) I need help

  1. #1
    Join Date
    Feb 2013
    Posts
    1

    javascript (student) I need help

    how would i

    A)
    Declare a var named historyText, setting its initial value to an empty text string.
    This is what i came up with

    var historyText ();

    B)
    insert a "for loop" in which the counter variable goes from 0 through the length of the bids array in increments of 1. Each time through the loop, append the text string...."bidTime bids (bidders) \n"

    to the history text variable, where bidTime, bids, and bidders are the current items in the bidTime, bids and bidders array based on the value of the counter var

    (note that \n is an escape character indicating a new line and causes the next entry to the history Text var to be placed on a new line.


    this is just some of what i have to do...i dont want all the answers i just need to understand what im
    reading and see how its executed. It would mean a lot if someone guided me on this one. Im working and trying really hard. Thank You in advance!

  2. #2
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,377

    Exclamation

    See comment in RED below...

    Quote Originally Posted by buellrobert View Post
    how would i

    A)
    Declare a var named historyText, setting its initial value to an empty text string.
    This is what i came up with

    var historyText ();
    Not the proper way to create a string variable.
    var historyText = ''';


    B)
    insert a "for loop" in which the counter variable goes from 0 through the length of the bids array in increments of 1. Each time through the loop, append the text string...."bidTime bids (bidders) \n"
    What "bids array"? Where defined?
    var bidsArray = []; // needs to be populated with something.

    to the history text variable, where bidTime, bids, and bidders are the current items in the bidTime, bids and bidders array based on the value of the counter var
    What is this all about? Where defined as containing what?

    (note that \n is an escape character indicating a new line and causes the next entry to the history Text var to be placed on a new line.


    this is just some of what i have to do...i dont want all the answers i just need to understand what im
    reading and see how its executed. It would mean a lot if someone guided me on this one. Im working and trying really hard. Thank You in advance!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles