• Get the Sum of Numbers in an Array

    Parameters

    • input: number[]

    Returns number

    Example

    import { array } from "@rjweb/utils"

    const arr = [1, 2, 3, 4, 5]

    array.sum(arr) // 15

    Since

    1.3.0

    Supports

    nodejs, browser