Skip to content

Commit 8453120

Browse files
Examples Added (sumn2u#194)
1 parent fe3610b commit 8453120

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

en/miscellaneous/ECMA-script.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@ This section of the document elaborates on why ECMAScript is crucial for JavaScr
8888

8989
- **TypeScript**: TypeScript, a superset of ECMAScript, adds static typing for enhanced tooling and code safety.
9090

91+
## Some Examples of ECMAScript Syntax
92+
93+
- **Arrow Function Syntax**: `const x = (x, y) => x + y;`
94+
95+
- **Class Syntax**: `class ClassName { constructor() { ... } }`
96+
97+
- **Promise Syntax**: `const promiseA = new Promise(myExecutorFunc);`
98+
`const promiseB = promiseA.then(handleFulfilled1, handleRejected1);`
99+
100+
- **Spread Operator**: `const year = [...q1, ...q2, ...q3, ...q4];`
101+
102+
- **Map**: `const x = new Map([ ["a", 500],["b", 300],["c", 200] ]);`
103+
91104
## Conclusion
92105

93106
ECMAScript is a fundamental part of web development, shaping how we create dynamic and interactive web applications. Staying informed about the latest ECMAScript features is essential for modern JavaScript development.

0 commit comments

Comments
 (0)