Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2D Array in JScript

Status
Not open for further replies.
To create a 2D 3x3 array:
Code:
  myArray = new Array(2)
  myArray[0] = new Array(2)
  myArray[1] = new Array(2)
  myArray[2] = new Array(2)
To assign values to elements in the arrays:
Code:
  myArray[0][0] = "this"
  myArray[0][1] = "that"
You're actually creating an array within each element of the first array.

HTH

Choo Khor
choo.khor@intelebill.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top