Array.prototype.map() & Array.prototype.forEach()
You must have used map() and forEach() for at least a 100 times but do you know the differences between these two higher order functions of JavaScript? Don't worry I got you covered.
First let's talk about higher order functions.
Don't go too deep in...
annukul.hashnode.dev3 min read
Ayodele Samuel Adebayo
Software Engineer & Customer Success Engineer at Hashnode
Good and straightforward explanation Annukul Thakran.
I'll also add that the
forEach()function returnsundefinedby default and not chainable by nature i.eforEach().then(=>{})will return undefined.