Closed ArnoldSmith86 closed 2 months ago
PR-SERVER-BOT: You can play around with it here: https://test.virtualtabletop.io/PR-2275/pr-test (or any other room on that server)
Takes an array, returns the sum of its elements. Should this be more fancy to handle values of an object or anything other than numbers in the array?
No.
Slightly unexpected outcome when not everything is a number. If no numbers before text, then you 0 and everything that follows all mashed together. If there are numbers, then text, then more numbers/text, you get the sum of the first group of numbers, then everything mashed together. I have no problem with this. If you are adding numbers and non-numbers, you can't expect valid results. This was just not what I was expecting. Works as it should on numerical arrays.
I added a button to the appropriate tutorial and will update the wiki when merged.
Takes an array, returns the sum of its elements. Should this be more fancy to handle values of an object or anything other than numbers in the array?