This commit is contained in:
Philippe Torrel
2026-08-05 09:49:28 +02:00
parent 07dfcec4ef
commit c548ea97a1
32 changed files with 4588 additions and 1956 deletions

View File

@@ -0,0 +1,14 @@
// Factory Function
const MathFn = () => {
// closures
const add = (a, b) => a + b;
const subtract = (a, b) => a - b;
const multiply = (a, b) => a * b;
const divide = (a, b) => {
return b === 0 ? NaN : a / b;
};
export { add, subtract, multiply, divide };
};
export default MathFn;