I don't really understand what does the export keyword in ES6. Cause when I do something like the first exemple here, but without export anything in ES5 it's still works.
//------ lib.js ------
var sqrt = Math.sqrt;
function square(x) {
return x * x;
}
function diag(x, y) {
return sqrt(square(x) + square(y));
}
//------ main.js ------
console.log(square(11)); // 121
console.log(diag(4, 3)); // 5
So of course I know that I miss a big part, that's why I'm looking for some explanation or link that explain what I need to learn cause I don't find anything :)

when I do something like above- there's nothing above!!export(andimport) are used in modules. If you are not using modules then you don't use them.import * as lib from 'lib';lib is a path and never called in a script tag ?