Coming from Python which is considered to be the data-science language I'm very pleased with JavaScript's data-crunching functions. They are just succinct and neat!
Take the one for example, here's how you flatten a two-dimensional array:
const nestedArray = [['๐', '๐'], ['๐', '๐'], ['๐', 'โก']];
const flatArray = [].concat(...nestedArray);
console.log(flatArray) // [ '๐', '๐', '๐', '๐', '๐', 'โก' ]
Hey, if you've found this useful, please share the post to help other folks find it: