Home / Javascript Tips Generated By ChatGPT / Organizing Code with Modules in Javascript Use modules to separate code into reusable pieces. Source Code // In file math.js export const add = (a, b) => a + b; // In another file import { add } from './math.js'; console.log(add(2, 3)); // 5