troubleshooting Question

3D Javascript Array

Avatar of kiqkinas
kiqkinasFlag for United States of America asked on
JavaScript
4 Comments1 Solution939 ViewsLast Modified:
I'm trying to declair a 3d Array but my syntax is wrong. Please help.
var prod_data = new Array("Helvetica", 
new Array(
	new Array("BL10102","2","2","1 5/8","1/2","6.20"),
	new Array("BL10103","3","3","2 1/4","1/2","6.40"),
	new Array("BL10103","4","3","3-7/8","1/2","7.40")
),
new Array(
	new Array("Times Bold",
	new Array("BL10204","4","3","3-7/8","1/2","7.40"),
	new Array("BL10206","6","4","5-3/4","3/4","9.80"),
	new Array("BL10208","8","5","5-3/4","7-5/8","12.40")
	)
);
 
alert(prod_data[0][0][0]); //Helvetica
alert(prod_data[0][1][0]); //BL10102
alert(prod_data[0][1][1]); //2
alert(prod_data[1][0][0]); //Times Bold
ASKER CERTIFIED SOLUTION
ruscomp

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros