How to create a multi dimensional array? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to create a multi dimensional array?

i want to create a multi dimensional array to find the sum of numbers of each row and column

24th Sep 2018, 3:29 PM
Athif Najeeb
Athif Najeeb - avatar
3 Answers
0
In what language?
24th Sep 2018, 3:37 PM
CodeMStr
CodeMStr - avatar
0
javascript
24th Sep 2018, 3:38 PM
Athif Najeeb
Athif Najeeb - avatar
0
I'm not sure if it's possible in Js, you could use a jagged array I guess var nums = new Array(1, 2); var nums2 = new Array(3, 4); var jaggedarr = new Array(nums, nums2); alert(jaggedarr[0][1]);//output 2
24th Sep 2018, 3:44 PM
CodeMStr
CodeMStr - avatar