Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js convert array of array to array

const arrInArr = [[1], [2, 3]];
const result = arrInArr.flat()
console.log(result); // [1, 2, 3]
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #convert #array #array #array
ADD COMMENT
Topic
Name
9+5 =