Merge pull request #2181 from vsemozhetbyt/patch-7

Mention arr.flat()/arr.flatMap() in 1.5.5
This commit is contained in:
Ilya Kantor 2020-10-11 17:18:50 +03:00 committed by GitHub
commit 37f67e6e7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -755,6 +755,8 @@ These methods are the most used ones, they cover 99% of use cases. But there are
- [arr.copyWithin(target, start, end)](mdn:js/Array/copyWithin) -- copies its elements from position `start` till position `end` into *itself*, at position `target` (overwrites existing).
- [arr.flat(depth)](mdn:js/Array/flat)/[arr.flatMap(fn)](mdn:js/Array/flatMap) create a new flat array from a multidimensional array.
For the full list, see the [manual](mdn:js/Array).
From the first sight it may seem that there are so many methods, quite difficult to remember. But actually that's much easier.