ES10 is not as significant as ES6 in terms of new language features but it does add several interesting ones.

1. String.matchAll()

const matchIterator = str.matchAll(regExp);

Given a string and a regular expression, matchAll() returns an iterator for the match objects of all matches.

2. Array.flat() & Array.flatMap()

The flat() method creates a new array with all sub-array elements concatenated…

Amandeep Kochhar

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