1// The file you wish to export: (add.js)
2export { add };
3const add = (n1, n2) => n1 + n2;
4
5// The file where you want to import it: (script.js)
6import * as Addition from "./add.js";
7const test1 = Addition.add(10, 20) // Results to 30
8const test2 = Addition.add(100, 1) // Results to 101