How to combine 2 arrays so that each of them has elements from the other for O (n) complexity?

let arr = [1,2]
let arr2 = ['first','second']

my solution with nested loops

const result = [];
for (let coachId of arr) {
  for (let managerId of arr2)
    result.push({ id1: coachId, id2: managerId });
}


//expected result
[{id1: 1, id2: 'first'}, {id1: 1, id2: 'second'}, {id1: 2, id2: 'first'}, {id1: 2, id2: 'second'}]