Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

$.sum()

Arthur Guiot edited this page Jul 12, 2017 · 1 revision

How does it work?

This function is made to return the sum of all numbers in an array, like that:

[0, 1, 2, 3, 4, 5]
//      |
//      v
       15

How to use it?

This function will require 1 argument, which is the array.

Example

Let's do what I showed you before:

JS:

$.sum($.range(5)) // 15

⚠️ Questions?

Don't hesitate to ask your questions ⁉️ in the issue part 😁

Clone this wiki locally