I'm sure there is an easy answer to this, so forgive me the simple question, but how do I add up all the values in a var?
What I did was set up a function to copy a blob of text and put that in a var. I then used regex to remove all text except the numbers. Now I want to add up all the numbers and put the sum on the clipboard. But I can't figure out how to add up all the numbers contained in that var. Any help?
Ok, thanks for answering. I didn't put them in an array (I wouldn't know how). They are in whatever format the clipboard gave. When I run what I have, I am left with this in the var: