JS 2020 new features

in this article, you’re going to learn 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

FlatMap method concats emoji with nested lists.

--

--

Ahmadullahnikzad

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