1.0.16 • Published 5 years ago
exponentiation v1.0.16
exponentiation
A Node.js package that assists in easy exponentiation.
Usage
First, install the package using npm:
npm i exponentiation -P
Then, require the package and use it like so:
const exp = require('exponentiation');
console.log(exp(2, 10)); // 1024
console.log(exp(1, '0')); // 1
console.log(exp(null, 3)); // Error: Both arguments must be numbers.
console.log(exp(1, undefined)); // Error: Both arguments must be numbers.
License
MIT