Package Exports
- mnemos-coder
- mnemos-coder/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mnemos-coder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Calculator Functions
This project provides basic calculator functions implemented in JavaScript.
Functions
add(a, b)
Adds two numbers together.
Parameters:
a
(number): First numberb
(number): Second number
Returns:
- (number): The sum of a and b
multiply(a, b)
Multiplies two numbers.
Parameters:
a
(number): First numberb
(number): Second number
Returns:
- (number): The product of a and b
Usage
const { add, multiply } = require('./calc');
// Example usage
console.log(add(2, 3)); // Output: 5
console.log(multiply(4, 5)); // Output: 20
Running Tests
To run the tests:
node test.js
This will execute the simple tests for both functions and display the results.