Adding previous numeric values in Array during for loop

Hello all… here a question.

While a for loop runs through all the elements in an array I want to get the width of each element and add it to the sum of the width of all previous elements.

Any ideas?

Help would be great folks!

All the best…