I want to import a function in my js file. Here is a simple code:
// In index.js file
function addition(a, b) {
return a + b;
}
export { addition };
// In test.js file
import { addition } from "./index.js";
console.log(addition(5, 4));
Thanks !