This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Ronan Rooney
Posted Mar 27 - Read on Facebook

How to get the sum of all the values inside an array? For example, myArray = [1, 2, 3, 4, 5] would produce a sum of 15.


Joshua Tucker

sum = 0

for value in myArray
sum += value

Ronan Rooney

Thank you very much, Joshua Tucker!

Billy Rukh

myArray.reduce (x, y) -> x + y

Read the entire post on Facebook