[ '6', 'Shorter', '157' ]
[ '7', 'Fraser', '157' ]
.......
['6','7',....]
, ['Shorter','Fraser',....]
,['157','157',....]
const data = [
[ '6', 'Shorter', '157' ],
[ '7', 'Fraser', '157' ],
[ '6', 'Chandter', '156' ]
// ...
];
const result = data.reduce((acc, cur) => {
acc.forEach((el, idx) => {el.push(cur[idx])});
return acc;
}, [[], [], []]);
// [["6","7","6"],["Shorter","Fraser","Chandter"],["157","157","156"]]
const arrays = [
[ '6', 'Shorter', '157' ],
[ '7', 'Fraser', '158' ],
[ '8', 'Test', '159' ]
]
const firstArray = []
const secondArray = []
const thirdArray = []
arrays.forEach(array => {
firstArray.push(array[0])
secondArray.push(array[1])
thirdArray.push(array[2])
})
console.log(firstArray)
console.log(secondArray)
console.log(thirdArray)