01 / 07

List all the new things introduced in ES6

Difficulty: 5/10
ES6 syntax, modules, async primitives
  1. 1

    Arrow functions

  2. 2

    Classes

  3. 3

    Modules

  4. 4

    Promises

  5. 5

    Template strings

  6. 6

    Destrcuturing object, array

  7. 7

    Spread and rest operator

  8. 8

    Let & const keywords

  9. 9

    For–of iterator

  10. 10

    Map + Set + WeakMap + WeakSet

  11. 11

    Generators

  12. 12

    Symbols

  13. 13

    Proxies

  14. 14

    Improved support for Unicode

  15. 15

    Tail call optimisation

  16. 16

    Subclassing built-ins

Scenario Questions

0-2 years experience

  1. 1We have a function that uses var and a traditional function expression; how would you rewrite it using let/const and an arrow function?
  2. 2If you need to concatenate several strings and embed variables, what ES6 syntax would you use and why?
  3. 3Show me how you would import a named export and a default export from an ES6 module in a small script.

2-5 years experience

  1. 1After converting a prototype‑based object to an ES6 class, a method that used to be inherited is now undefined—what could have gone wrong?
  2. 2Your team switched a callback chain to use Promise.then, but an error isn’t being caught; can you walk through why that might happen?
  3. 3You replaced a for loop with a for…of loop on a large array and noticed a slowdown; what factors would you investigate?

5-8 years experience

  1. 1Design a module loading strategy for a front‑end application of 200+ components using ES6 import/export versus a bundler like Webpack; what trade‑offs do you consider?
  2. 2We need to migrate a legacy codebase that heavily uses callbacks to async/await; how would you approach the refactor while preserving error handling and test coverage?
  3. 3When cloning a deep object in a performance‑critical path, would you use the spread operator, Object.assign, or a utility library? Explain the impact on memory and speed.

8+ years experience

  1. 1Our organization has dozens of services written in CommonJS; we want to move to ES6 modules across the board. How would you plan the migration to minimize breakage and support both module systems during the transition?
  2. 2Discuss the long‑term maintenance implications of adopting ES6 features like Symbol and Proxy in a public API library that must support older runtimes.
  3. 3How would you evaluate the benefits of native ES6 tree‑shaking versus a custom build pipeline when scaling a monorepo of UI components?

Follow-up Questions

  • Which of those features have you found most useful in production?
  • How do you decide when to use a class versus a factory function?
  • What tooling do you rely on to support ES6 in older browsers?
Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.