mathematical_operation
v1.5.3
Published
mathematical_operation package can do mathematical operation like addition,subtraction,multiplication,division,Modulus,square,cube,factorial,array sum element of number
Downloads
16
Maintainers
Readme
mathematical_operation package can do mathematical operation like addition,subtraction,multiplication,division,Modulus,square,cube,factorial,array sum element of number
// installation ->
npm i mathematical_operation
// how to use ->
let operation = require('mathematical_operation');
let sum = operation.add(a,b);
console.log(sum);
let sub = operation.subtract(a,b);
console.log(sub)
// for array sum
let array = [1,2,3,4,5];
let array_sum = operation.arraySum(...array);
console.log(array_sum);
// for factorial
let num = 7;
let factAns = operation.factorial(num);
console.log(factAns);