calc.sum function?
#4130
-
Hey! #let sum = calc.sum(lines.map(line => line.amount * line.price)) Now I found out that calc.sum doesn't exist and I was not able to find an alternative for it, now my question is: why? calc.max/calc.min exist, why not calc.sum? |
Beta Was this translation helpful? Give feedback.
Answered by
PgBiel
May 13, 2024
Replies: 1 comment 1 reply
-
You can use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
maribox
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
lines.map(line => line.amount * line.price).sum()
.