call(back)

What Were the Best Improvements in ES6?

What are the best improvements in ES6?

Answer out loud in under a minute: a definition, one concrete example, and one pitfall or trade-off.

Hints

Hint 1

Pick two and say what bug each one removed, rather than listing twelve features.

Solution

Show the approach

Answer

Block scope with let and const; arrow functions with lexical this; classes; modules; promises; destructuring and spread; template literals; Map and Set; iterators and generators. Pick two and say what each removed: let ended the shared-loop-variable bug, and modules ended global-namespace collisions between scripts.

Assistant

Sign in to use the assistant — ask what the problem means, get a hint when you're stuck, or have your current work reviewed. Conversations save to your account.

Asked at

Similar Problems3