I am trying to understand how a and b are used in the sort() method but I am having trouble understanding why the "a" argument of this array is [3,7] and [2,5] rather than the element at array[0], which would be the first argument [1,4] below is the example of the code I have been experimenting with
const array = [[1,4],[3,7],[2,5]];
array.sort((a,b)=>console.log(a))