Learn JavaScript

Lesson 6 of 9 · Modules: import, export and How Files Find Each Other

Module 11 · Modules: import, export and How Files Find Each Other

The Interview and Contest Pack: Five Real Differences, Cycle Puzzles and Tree Shaking

ProReading

Almost every JavaScript interview that touches tooling asks one question: "What is the difference between ES modules and CommonJS?" A weak answer lists syntax. A strong answer names behaviour, and can show it. This lesson gives you the strong answer, the cycle puzzles that follow it, and the patterns behind this module's judged problems.

Checking what this lesson needs for you…

What is inside The Interview and Contest Pack: Five Real Differences, Cycle Puzzles and Tree Shaking

  1. Pattern 1: the five real differences
  2. Pattern 2: circular puzzles
  3. Pattern 3: tree shaking, and what stops it
  4. Pattern 4: walking a deep graph without recursion
  5. Six interview questions