+ 3

How do I get output 11 of this code? [javascript]

var myArray = [[1,2,3], [4,5,6], [7,8,9], [[10,11,12], 13, 14]];

30th Jul 2020, 2:30 AM
SR Shoruv
SR Shoruv - avatar
3 Respostas
+ 1
document.write(myArray[3][0][1]); Explanation: To access any multi-dimensional array you only need the dimensional structure i.e [][][] you insert the index of the dimension you want to access (3), then the sub-dimensional index (0) , then the element index (1) in it’s dimension... I hope you understand...Goodluck🙏
30th Jul 2020, 3:23 AM
Umar Idris
Umar Idris - avatar
+ 1
ᎯᏰᏰᎯ__ᏥᎿᏩ➰ thanks i wrote document.write(myArray[3][1]) 😅😅
30th Jul 2020, 4:10 AM
SR Shoruv
SR Shoruv - avatar
0
😇😂
30th Jul 2020, 9:39 AM
Umar Idris
Umar Idris - avatar