Explore the new features of ES13.
· FindLast and FindLastIndex · Change Arrays in Copie · Hashbang Grammar · Symbols as WeakMap Key
While the find method provides the first matching element in a search, sometimes we want the final match, instead. findLast and findLastIndex help us do this.
Improved array techniques enable alterations to an array while preserving the original. Instead of directly modifying the array, you generate a copy and make the changes. This maintains the array's integrity while facilitating work with altered versions.
The inclusion of the shebang notation (#!) in the source code enables differentiate between scripts and modules. This enhances compatibility with build tools, promoting JavaScript's consistency with other languages.
Symbols are unique and immutable, making them good keys for data storage, unlikely to cause conflicts. This is an improvement from using objects as keys, which can lead to issues like memory leaks or unexpected behavior due to their referential nature.