Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScriptES module resolution algorithmSingle-choice MCQ

How does the module system handle an exported let that is reassigned after import, and why does this differ fundamentally from CommonJS require?

// counter.mjs export let count = 0; export function inc() { count++; } // main.mjs import { count, inc } from './counter.mjs'; inc(); console.log(count); // ?