19 lines
345 B
Markdown
19 lines
345 B
Markdown
## ES6 Features
|
|
|
|
### let & const
|
|
let → block scoped
|
|
const → cannot be reassigned
|
|
|
|
### Arrow Functions
|
|
const add = (a, b) => a + b;
|
|
|
|
### Template Literals
|
|
`Hello ${name}`
|
|
|
|
### Destructuring
|
|
const { name, role } = user;
|
|
|
|
### Practical Learning
|
|
Converted functions to arrow functions
|
|
Used template strings
|
|
Applied destructuring for cleaner code |