Array of Strings - How to stipulate when you are on the last one

I am using a For Each to loop through an array of individuals strings…

I have an “If” Statement nested inside of the For Each to stipulate what to do if we are on the first string as seen below:

No problems here.

The index is referring to the output of the For Each as seen here:

Is there a way I could utilize the index inside of another “If” Statement to show when we are on the last item of the array we are looping through?

Thanks in regards,

Use if index = splitpages.count -1 to figure out if you are on the last array element.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.