# Issue with for loop

**URL:** <https://forum.kirupa.com/t/issue-with-for-loop/313697>\
**Category:** flash\
**Created:** [September 7, 2010, 3:24pm UTC](https://forum.kirupa.com/t/issue-with-for-loop/313697 "2010-09-07T15:24:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jany](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jany](https://forum.kirupa.com/u/jany)\
**Post date:** [September 7, 2010, 3:24pm UTC](https://forum.kirupa.com/t/issue-with-for-loop/313697/1 "2010-09-07T15:24:04Z")

</div>

Hi,

I am using TweenMax.

I am making several points, and drawing a line out of it. The thing is, I don’t know how many points there will be, as they are dynamic.

```auto
var path:LinePath2D = new LinePath2D([ 	
           new Point(myNodes[0].x + 54, myNodes[0].y + 86), 
           new Point(myNodes[1].x + 54, myNodes[1].y + 86))]

```

So in this example, I am drawing a line between just two points. What if I don’t know how many points there are though? There has to be a way to run this through a loop to check how many elements are in “myNodes” array.

Any help would be great.
