The flatMap() array method in JavaScript
Originally posted here!
The flatMap() is an array method and is used to do some operation before converting a multidimementional array into a single array.
Suppose we have an array of sentences like this,
// an array of sentences
let arr = [
"Hell...
melvingeorge-me.hashnode.dev3 min read