Skip to content

Commit

Permalink
Examples Added (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
VaibhavSharma24 authored Oct 31, 2023
1 parent fe3610b commit 8453120
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions en/miscellaneous/ECMA-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ This section of the document elaborates on why ECMAScript is crucial for JavaScr

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

## Some Examples of ECMAScript Syntax

- **Arrow Function Syntax**: `const x = (x, y) => x + y;`

- **Class Syntax**: `class ClassName { constructor() { ... } }`

- **Promise Syntax**: `const promiseA = new Promise(myExecutorFunc);`
`const promiseB = promiseA.then(handleFulfilled1, handleRejected1);`

- **Spread Operator**: `const year = [...q1, ...q2, ...q3, ...q4];`

- **Map**: `const x = new Map([ ["a", 500],["b", 300],["c", 200] ]);`

## Conclusion

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.
Expand Down

1 comment on commit 8453120

@vercel
Copy link

@vercel vercel bot commented on 8453120 Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.