You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+100-4
Original file line number
Diff line number
Diff line change
@@ -116,6 +116,15 @@ Each proposal for an ECMAScript feature goes through the following maturity stag
116
116
|2 |[Hashbang syntax](#hashbang-syntax)|
117
117
|3 |[Symbols as WeakMap keys](#symbols-as-weakmap-keys)|
118
118
|4 |[Change Array by Copy](#change-array-by-copy)|
119
+
||**ES2024 Or ES15**|
120
+
|1 |[GroupBy into objects and maps](#groupby-into-objects-and-maps)|
121
+
|2 |[Temporal API](#temporal-api)|
122
+
|3 |[Well formed unicode strings](#well-formed-unicode-strings)|
123
+
|4 |[Atomic waitSync](#atomic-waitsync)|
124
+
|5 |[RegEx v Flag and string properties](#regEx-v-flag-and-string-properties)|
125
+
|6 |[Pipeline Operator](#pipeline-operator)|
126
+
|7 |[Records and Tuples](#records-and-tuples)|
127
+
|8 |[Decorators](#decorators)|
119
128
120
129
## ES2015 Or ES6
121
130
@@ -2441,7 +2450,7 @@ Most of these features already supported by some browsers and try out with babel
2441
2450
## ES2023 Or ES14
2442
2451
ECMAScript 2023 or ES14 has been released in the month of June 2023 with some of important features like adding new methods for searching and altering the arrays, supporting symbols as keys for WeakMap API and standardizing the hashbang syntax in JavaScript.
2443
2452
2444
-
1. ### find-array-from-last
2453
+
1. ### Find arrayfromlast
2445
2454
2446
2455
This release introduced two new array methods named **findLast()** and **findLastIndex()** to search an array element from the last. Their functionality is similar to **find()** and **findIndex()** but searching starts from the end of an array. These methods are available on **Array** and **TypedArray** prototypes. This feature provides an efficient way for reverse order search by eliminating the process of manual array reversal.
2447
2456
@@ -2465,7 +2474,7 @@ Most of these features already supported by some browsers and try out with babel
2465
2474
console.log(numbers.findLastIndex(isOdd)); // 4
2466
2475
```
2467
2476
2468
-
2. ### hashbang-syntax
2477
+
2. ### Hashbang syntax
2469
2478
Hashbang(as known as shebang) grammer has been supported with a sequence of characters(#!) at the beginning of an executable script to define the interpreter for the program to run. In other words, this syntax is helpful to tell the operating system which interpreter to use while executing the script.
2470
2479
2471
2480
For example, the below javacript file will be executed in NodeJS interpreter from Unix commandline.
@@ -2475,7 +2484,7 @@ Most of these features already supported by some browsers and try out with babel
2475
2484
console.log("Hello world from hashbang syntax");
2476
2485
```
2477
2486
2478
-
3. ### symbols-as-weakmap-keys
2487
+
3. ### Symbols as weakmapkeys
2479
2488
Prior to ES2023, WeakMaps are only limited to allow objects as keys because objects are unique and cannot be re-created. Since symbols are the only primitives in ECMAScript that allows unique values, WeakMap API has been extended with symbols as keys instead of just using objects.
2480
2489
2481
2490
As an example, the usage of WeakMap with objects as keys prior to ES2023 looks like below
@@ -2495,7 +2504,7 @@ Most of these features already supported by some browsers and try out with babel
2495
2504
console.log(weak.get(key)); //ES2023
2496
2505
```
2497
2506
2498
-
4. ### change-array-by-copy
2507
+
4. ### Change array by copy
2499
2508
Both **Array** and **TypedArray** has built-in methods such as **reverse()**, **sort()** and **splice()** to perform common actions like sorting, reverse the array elements and replacing(or removing) elements. But these methods are mutating the original array. Where as ES2023 has provided additional methods such as **toReversed()**, **toSorted()**, **toSpliced** and **with()** methods which returns new array copies instead of mutating the original array.
2500
2509
2501
2510
For example, these additional methods returns new array copies for number array without mutating the original array as shown below,
@@ -2524,3 +2533,90 @@ Most of these features already supported by some browsers and try out with babel
2524
2533
```
2525
2534
2526
2535
**[⬆ Back to Top](#table-of-contents)**
2536
+
2537
+
## ES2024 or ES15
2538
+
2539
+
ES2024 is planned to be release in June 2024 with a couple of features and enhancements for the developers to make coding in JavaScript more efficient, readable, and robust.
2540
+
2541
+
1. ### GroupBy into objects and maps:
2542
+
2543
+
The `Object.groupBy()` method is used to group object elements of an iterable(like array) based on string values returned from a callback function. It returns an object with each group name as key and respective array of elements as value. The elements in the returned object and the original object are the same. i.e, If you change the internal structure of the elements, it will be reflected in both original and returned object.
2544
+
2545
+
In the following example, persons are into categories into several groups based on their age.
2546
+
2547
+
```javascript
2548
+
constpersons= [
2549
+
{name:"John", age:70},
2550
+
{name:"Kane", age:5},
2551
+
{name:"Jack", age:50},
2552
+
{name:"Rambo", age:15}
2553
+
];
2554
+
2555
+
// Callback function to categorize people based on age
0 commit comments