Skip to content

Instantly share code, notes, and snippets.

View witalobenicio's full-sized avatar

Witalo Benicio witalobenicio

  • Nexla
View GitHub Profile
function witaloFlatten(arr) {
return arr.reduce((flat, next) =>
flat.concat(Array.isArray(next) ? witaloFlatten(next) : next), []);
}