Module Maze · Level 6 of 8

ESM imports are live

main.mjs imports count and increment(), calls increment(), and reads count again.

main.mjs
import { count, increment } from './counter.mjs';console.log('count is ' + count);increment();console.log('count is ' + count);
counter.mjs 2 lines
export let count = 0;export function increment() { count++; }

1. Predict the output

Tap the lines in the order you think they print.

  1. 1…
  2. 2…