# The 'for' statement

**URL:** <https://forum.kirupa.com/t/the-for-statement/298844>\
**Category:** Uncategorized\
**Created:** [October 26, 2009, 10:08am UTC](https://forum.kirupa.com/t/the-for-statement/298844 "2009-10-26T10:08:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ritwik\_ind](https://avatars.discourse-cdn.com/v4/letter/r/e47c2d/32.png) [@ritwik\_ind](https://forum.kirupa.com/u/ritwik_ind)\
**Post date:** [October 26, 2009, 10:08am UTC](https://forum.kirupa.com/t/the-for-statement/298844/1 "2009-10-26T10:08:47Z")

</div>

Hi, I need a solution to this simple problem.

var myName:String = “Pink Floyd Sound”;  
var i:Number;

myFig = new Array();  
for(i=0;i\<=10;i++) {  
myFig \* = myName;  
trace(myName\*);  
}

I want to display the string text 10 times using the for loop. I did this, and all I get is undefined.
