+ 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 Antworten
+ 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
😇😂