arraycalc

Execute Mathematical functions on arrays =========

Usage no npm install needed!

<script type="module">
  import arraycalc from 'https://cdn.skypack.dev/arraycalc';
</script>

README

arraycalc

Execute Mathematical functions on arrays

Installation

npm install arraycalc

Usage

require('arraycalc');

    const array = [1,2,1,3]
    console.log("sum :" + array.sum());
    console.log("max :" + array.max());
    console.log("min :" + array.min());
    console.log("avg :" + array.avg());

Output should be

    sum : 7
    max : 3
    min : 1
    avg : 1.75