function findHeader(aoa) {
  const {i} = aoa.reduce(
    (prev, row, i) => {
      const len = rowLength(row)
      if (prev.len < len) {
        return {i, len}
      }
      return prev
    },
    {i: -1, len: 0}
  )
  return i
}
function findHeader(aoa) {
  const {i} = aoa.reduce(
    (prev, row, i) => {
      const len = rowLength(row)
      if (prev.len < len) {
        return {i, len}
      }
      return prev
    },
    {i: -1, len: 0}
  )
  return i
}
function findHeader ( aoa ) { const { i } = aoa . reduce ( ( prev , row , i ) => { const len = rowLength ( row ) if ( prev . len < len ) { return { i , len } } return prev } , { i : - 1 , len : 0 } ) return i }
finds the first row with the most columns
finds the first row with the most columns