Is there a way to check the values of elements in a 2D array?
Here is an example of a 2D array I am working with:
array: [
["A", 24, 5],
["B", 135, 5],
["C", 2124, 5]
]
I want to run a function only if all the values in the second position (array[i][2]) are equal to 5.
for (i = 0; i < array.length; i++){
if (that.ptLiaison[i][2]=="5"){ //need to verify all instances of i simultaneously
*execute function*
}
}