creating and parsing a 3D array in javascript? -


can 1 me create , parse 3d array in javascript.

im having questionid each question id have selected option , optional option text.

so need create 3d array questionid,optionid,optiontext(string)..

thnks in advance

a 1 dimension array be:

var myarr = new array(); myarr[0] = "hi"; myarr[1] = "there"; myarr[2] = "dude";  alert(myarr[1]);    // alerts 'there' 

a 2 dimensional array be:

var myarr = new array(); myarr[0] = new array("val", "va"); myarr[1] = new array("val", "yo"); myarr[2] = new array("val", "val");  alert(myarr[1][1]); // alerts 'yo' 

a 3d array more complicated, , should evaluate proposed use of has limited scope within web. 99% of problems can solved 1d or 2d arrays. 3d array be:

var myarr = new array(); myarr[0] = new array(); myarr[0][0] = new array() myarr[0][0][0] = "howdy"; myarr[0][0][1] = "pardner";  alert(myarr[0][0][1]); // alerts 'pardner' 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -