Avuya Mxoli

Avuya Mxoli

  • NA
  • 236
  • 208.7k

functions, arrays

May 15 2011 5:11 AM
hello, i have been asked to generate javascript code that will allow a user to keep track of stock. the user will in a form enter:
stock price,description,stick code. then the user should be able to change the stock price of any item and then display the changed price together with the other items.
e.g
Stock Code          c101
Description           white shoe
Price                   150
[add button] clears the filed for the user to enter more

stock code          c101
Price                   120
[update button]

then the new list with the updated price should be displayed.

I am thinking of using an array to store the information but I do not know how to access each element in the array for editing and storing all the items that the user will enter. I came across "array of objects" though so maybe i can use that too??

Plz help, thanks


Answers (22)