project-1a-maths
v1.1.0
Published
Simple Math Project for npm
Downloads
1
Readme
Math Operations
Module to do simple math operations
Installation
Follow this instructions
npm install project-1a-maths
Use
Follow this instructions
// Import the module
const mathModule = require('.');
// Sums
console.log(mathModule.sum(1, 2)); // Expects: 3
console.log(mathModule.sum(1, 34)); // Expects: 35
// Substracts
console.log(mathModule.substract(11, 24)); // Expects: -13
console.log(mathModule.substract(1, 2)); // Expects: -1
// Multiplication
console.log(mathModule.multiply(11, 24)); // Expects: 24
console.log(mathModule.multiply(1, 2)); // Expects: 2
// Division
console.log(mathModule.multiply(1, 4)); // Expects: 0.25
console.log(mathModule.multiply(1, 2)); // Expects: 0.5