JS 2020 new features

Flat & FlatMap arrow

Flat(depth of arrow);

This method which is introduced in 2020 flattens the arrow which requires a parameter which is the depth of an arrow in this our arrow depth is 2.

FlatMap(callback function);

This method does two tasks, first flattens an arrow then do the task of map method which we can add changes to an arrow elements

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ahmadullahnikzad

Ahmadullahnikzad

17 Followers

I am a web developer who writes web development content for you to make web development easier