JSFiddle - React, Tailwind, and code Playground JavaScript const inputArray = [1, 2, 3, [4, 5]]; console.log([].concat(...inputArray));