Week 3 Day 2: JavaScript ES6 features

This commit is contained in:
2026-01-09 15:50:45 +05:30
parent 6d6a8fd0ea
commit 865fcf0db7
3 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
## 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