git commit -a
.var numberOfCalls = 0;
return function() {
return ++numberOfCalls;
}
const test = [
[2, 7, 2],
[2, 5, 4],
[2, 1, 5],
[3, 1, 2]
]
const concat = [].concat(...test)
const min = Math.min.apply(null, concat)
const index = concat.findIndex(e => e === min)
alert(`test[${Math.floor(index / 3)}][${Math.floor(index % 3)}]`)