+ 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]];
3 Answers
+ 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đ
+ 1
áŻá°á°áŻ__á„áżá©â° thanks i wrote document.write(myArray[3][1]) đ
đ
0
đđ