I have a multi dimensional array that has 3 elements in each index.
Example [[bob,12,white],[alex,2,hispanic]]
How can I sort the array by the integer age (middle value)?
Take a look at Array.prototype.sort. You can pass a function to determine how your array should be sorted.
const sorted = [
['bob',12,'white'],
['alex',2,'hispanic']
].sort((a, b) => a[1] - b[1]) // sorts by integer age asc
console.log(sorted)