JSFiddle - React, Tailwind, and code Playground

by Rodrigo Portillo

JavaScript

let x = [ [1, [2, 3]], [4, 5], [6, [7, 8]] ];
 x = x.flat(2);
 console.log(x);