js reverse array of arrays code example Example: reverse array in javascript const reverseArray = arr => arr.reduce((acc, val) => [val, ...acc], [])