When you use the variable loopCounter it gets a numerical value and uses that to determine the number of loops for a specific timeline. If you wanted to track the loop count for two timelines, you would need to make a new variable. You could call it loopCounter2 -- as long as it has a different name it can hold a different value and count its own loops.
Oh I see, that makes sense. The first javascript function is names loop(). Do I need create another function and call it loop2 or something like that? Or can I create the second piece of code within the first loop function?
It depends how you’re using this, but my guess would be that you want to make two different functions. Make sure you also initialize a 0 value for loopCounter2 in the head (or whichever name you choose).