Here’s the deal: typed arrays are not fully portable. On most browsers, this code will print 1:
var a1 = new Uint32Array(); var a2 = new Uint8Array(a1.buffer); console.log(a2)
One of the great features of ES6 modules is the direct style module loading syntax:
import map from "underscore.js"; ... map(a, f) ...
This makes it as frictionless as possible to grow or refactor your code into multiple modules, and to pull third-party modules into an existing codebase. It also makes a common module format that can be shared between the browser and JS servers like Node.