I have 2 arrays :
const firstArr = [1,2,3,4,5,6];
const secondArr = [7,8,9,10,11,12];
I am trying to use a map loop like this :
arr.map(num1 => arr1.map(num2 => `${[num1]} ${num2}`))
I need the results of the second first array inside the results of the second one. Right now with the method i did it, Everything is duplicating:
0: (6) ["1,7", "1,8", "1,9", "1,10", "1,11", "1,12"]
1: (6) ["2,7", "2,8", "2,9", "2,10", "2,11", "2,12"]
2: (6) ["3,7", "3,8", "3,9", "3,10", "3,11", "3,12"]
3: (6) ["4,7", "4,8", "4,9", "4,10", "4,11", "4,12"]
4: (6) ["5,7", "5,8", "5,9", "5,10", "5,11", "5,12"]
5: (6) ["6,7", "6,8", "6,9", "6,10", "6,11", "6,12"]
Is it possible to have the results only once ? My expected result is ['1,7' , '2,8' , " 3,9"] and so on.
Sorry I am still a noob :/ ...