Values as constants in ES modules in JavaScript

Imported values behave like constants. Let's look at an example. Let's export a string:

export default 'aaa';

And do an import:

import str from './test.js';

Let's try to change the string:

str = 'bbb'; // an error
enru