Udemy Es6 ((hot))

Both let and const are block-scoped . This means they only exist within the specific block of code (denoted by curly braces {} ) where they are defined. This drastically reduces the chance of accidental variable leakage and bugs.

In pre-ES6 days, combining variables and strings was a messy affair involving the plus ( + ) operator. udemy es6

The three-dot syntax functions beautifully in two capacities depending on context: Both let and const are block-scoped

Arrow functions are not just syntactic sugar (shorter code). They also handle the this keyword differently. In traditional functions, this can change depending on how the function is called. Arrow functions inherit this from their parent scope, which solves a massive headache developers faced when working with event listeners and object methods. udemy es6