export const foo = "my const";
export default class User
{
constructor(name)
{
this.name = name;
}
sayHello()
{
console.log("hello, ", name);
}
}
<script type="module">
import User from './b.js';
new User("Mike");
User.sayHello();
</script>