How can I test the values of a 2D array ?
I have a 2D array that looks like this :
array: [
["A", 24, 5],
["B", 135, 5],
["C", 2124, 5]
]
What I need is to execute a function if all the values in position 2 : array[i][2] are equal to 5.
for (i = 0; i < array.length; i++){
if (that.ptLiaison[i][2]=="5"){ //need to check all the instances of i at once
*execute function*
}
}