Change the value of imported variable in ES6 : <p>I'm using ES6 modules and am importing a variable from <code>moduleA</code> into <code>moduleB</code>:</p>

<pre><code>//moduleA.js
let a = 5;
let b;

export { a, b };

//moduleB.js
import { a, b } from './moduleA'

a = 6;
b = 1;
</code></pre>

<p>But on change/assignment in <code>moduleB</code> I'm getting error such as:</p>

<blockquote>
  <p>a = 6;</p>
  
  <p>ReferenceError: a is not defined</p>
</blockquote>

<p>On the other hand I can <code>console.log(a)</code> in <code>moduleB</code>.</p>

<p>It seams it is not possible to assign to imported variables? Is this true or am I missing the way to do it? Why is this not possible?</p>
