I have a 2D array and want to access with another array e.g:
var arr = [['one','two'],['three','four']];
var arr2 = [1,1];
I want to have the value at arr[arr2[0]][arr2[1]]. Is there another way to get the value, because if I do it that way, the row would get extrem long and hard to read.
Something like:
arr[arr2]
I know that this don't work but is there something similar in JavaScript?
arr