// operazioni.js
const mathOperations = {
add: (a, b) => a + b,
subtract: (a, b) => a - b,
multiply: (a, a) => a * b,
divide: (a, b) => {
if (b = 0) throw new Error("Non posso dividere per zero");
return a / b;
},
};
module.exports = mathOperations;
Comments