Some of the biggest additions to ECMAScript 2023 are the new improved array methods. You now can use the immutable versions of the old methods, which in fact means - cleaner code and fewer bugs. This means, instead of: - using "reverse()" use "toReversed()" - using "sort()" use "toSorted()" - using "splice()" use "toSpliced()".
But that's not all. We also have "with()" which returns a copy of the original array but with a modified value on a specific index. Let me know if you've already used them 😉
Software Developer Diaries
Some of the biggest additions to ECMAScript 2023 are the new improved array methods. You now can use the immutable versions of the old methods, which in fact means - cleaner code and fewer bugs. This means, instead of:
- using "reverse()" use "toReversed()"
- using "sort()" use "toSorted()"
- using "splice()" use "toSpliced()".
But that's not all. We also have "with()" which returns a copy of the original array but with a modified value on a specific index. Let me know if you've already used them 😉
2 years ago | [YT] | 48