-
Difference between var, let, and const: var is function-scoped and can be redeclared or updated, let is block-scoped and can be updated but not redeclared, const is block-scoped and cannot be updated or redeclared.
-
Difference between map(), forEach(), and filter(): map() returns a new array after transforming elements, forEach() loops through elements without returning a new array, filter() returns a new array with elements that pass a condition.
-
Arrow functions in ES6: shorter syntax for functions like
const add = (a, b) => a + b;andthisbehaves differently than in regular functions. -
Destructuring assignment in ES6: allows easy extraction of values from arrays or objects, e.g.,
const [a, b] = [1, 2]; const {name, age} = {name:"Alice", age:25};. -
Template literals in ES6: use backticks
`to include variables and multi-line strings, e.g.,`Hello, ${name}!`; cleaner than string concatenation and supports multi-line easily.
FarhanShuvon/Assignment_6
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|