Skip to main content
Module

x/simplestatistics/index.js>sumSimple

simple statistics for node & browser javascript
Go to Latest
function sumSimple
import { sumSimple } from "https://deno.land/x/simplestatistics@v7.7.5/index.js";

The simple sum of an array is the result of adding all numbers together, starting from zero.

This runs in O(n), linear time, with respect to the length of the array.

Examples

sumSimple([1, 2, 3]); // => 6

Parameters

x

input