1.0.1 • Published 4 years ago
test-math-for-tutorial v1.0.1
Test-Math-Calculation-for-Youtube-tutorial
This is a simple math calculating npm package for my youtube tutorial.
Installation
$ npm install test-math-for-tutorial
Example Addition
const pckg = require("test-math-for-tutorial");
console.log(pckg.calculate(5, "+", 6));//logs 11.
Subtraction
const pckg = require("test-math-for-tutorial");
console.log(pckg.calculate(5, "-", 6));//logs 1.
Multiplication
const pckg = require("test-math-for-tutorial");
console.log(pckg.calculate(5, "*", 6));//logs 30.
Division
const pckg = require("test-math-for-tutorial");
console.log(pckg.calculate(5, "/", 6));// logs 1.2.
Square Root
const pckg = require("test-math-for-tutorial");
console.log(pckg.squareRoot(49));// logs 7;