Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.8.0/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