0

How do I make Tables as Javascript Arrays

How do I make arrays that have multiple rows and columns. Is it done by creating arrays withing arrays? Or is there another way?

21st May 2017, 11:14 AM
Fungai Makawa
Fungai Makawa - avatar
6 Answers
0
You can define it in Json
21st May 2017, 11:59 AM
CalviŐČ
CalviŐČ - avatar
0
Actually it's better to define an object for this type of data but you can also use associated array but it's not recommended
21st May 2017, 2:39 PM
ahmad mansouri
ahmad mansouri - avatar
0
An object isn't ideal since I was going to use the table to derive values for other objects. For example rows for age, gender,grades etc and columns for names of individuals as an example.
21st May 2017, 3:42 PM
Fungai Makawa
Fungai Makawa - avatar
0
var tables = new Array("age", "gender", "grades");
22nd May 2017, 4:52 PM
‎‏â€Ș4CORNERS “WALLIE”‬‏‎
‎‏â€Ș4CORNERS “WALLIE”‬‏‎ - avatar
0
@4Corners"wallie" that would only create a single row. I suppose I have to use [[1,2,3],[4,5,6],[7,8,9]]
22nd May 2017, 5:05 PM
Fungai Makawa
Fungai Makawa - avatar
0
@Calvin, I need it self contained within Javascript
22nd May 2017, 5:06 PM
Fungai Makawa
Fungai Makawa - avatar