Skip to content

$.multiply()

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

How does it work?

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

[1, 2, 3, 4, 5]
//      |
//      v
       120

It's pretty similar to the $.sum() function

How to use it?

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

Example

Let's do what I showed you before:

JS:

$.multiply($.arange(1,5,1)) // 120

⚠️ Questions?

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

Clone this wiki locally