01 / 07

List all the new things introduced in ES6

  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

Difficulty: 5/10
Topics: ES6 syntax, modules, async primitives

Scenario Questions

0-2 years experience
  1. 1

    We have a function that uses var and a traditional function expression; how would you rewrite it using let/const and an arrow function?

  2. 2

    If you need to concatenate several strings and embed variables, what ES6 syntax would you use and why?

  3. 3

    Show 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. 1

    After 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. 2

    Your 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. 3

    You 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. 1

    Design 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. 2

    We 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. 3

    When 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. 1

    Our 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. 2

    Discuss the long‑term maintenance implications of adopting ES6 features like Symbol and Proxy in a public API library that must support older runtimes.

  3. 3

    How 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?