29. Named export/import
// export.js
export function foo() {
return "foo";
}
export class Bar {}
export var baz = "baz";
// import.js
import {foo, Bar, baz} from "./export.js";
foo();
new Bar();
console.log(baz); // "baz"
41. Strict mode in Modules
// in module
console.log(this); // undefined
var foo = 1; // module local, not global
// Error!
with (obj) {}
// Error!
var obj = {a: 1, a: 1};