Answers for "js convert array of array to array"

1

js convert array of array to array

const arrInArr = [[1], [2, 3]];
const result = arrInArr.flat()
console.log(result); // [1, 2, 3]
Posted by: Guest on March-18-2022
1

js convert array of arrays to array

// Converts array with multiple values into a single array with all items:
var merged = [].concat.apply([], arrays);
Posted by: Guest on August-23-2020

Code answers related to "js convert array of array to array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language