Can you still?

What's the output?

counter.js
let counter = 10;
export default counter;
index.js
import myCounter from './counter';

myCounter += 1;

console.log(myCounter);

You missed this one before

An imported module is read-only: you cannot modify the imported module. Only the module that exports them can change its value.

When we try to increment the value of myCounter, it throws an error: myCounter is read-only and cannot be modified.

Question 57 · see the original (opens in a new tab)