Get your own Node server
// Import default export
import Calculator from './math.js';

// Import named exports
import { PI, add, multiply } from './math.js';

// Import with alias
import { add as mathAdd } from './math.js';

// Import all exports as a namespace
import * as MathUtils from './math.js';

const calc = new Calculator();
console.log(calc.subtract(10, 5)); // 5

console.log(add(2, 3)); // 5
console.log(mathAdd(4, 5)); // 9
console.log(MathUtils.PI); // 3.14159
console.log(MathUtils.multiply(2, 3)); // 6

              
5
5
9
3.14159
6