# Am getting funny result from this following loop

**URL:** <https://forum.kirupa.com/t/am-getting-funny-result-from-this-following-loop/181256>\
**Category:** Uncategorized\
**Created:** [March 7, 2006, 7:55pm UTC](https://forum.kirupa.com/t/am-getting-funny-result-from-this-following-loop/181256 "2006-03-07T19:55:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SelectionTool](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@SelectionTool](https://forum.kirupa.com/u/SelectionTool)\
**Post date:** [March 7, 2006, 7:55pm UTC](https://forum.kirupa.com/t/am-getting-funny-result-from-this-following-loop/181256/1 "2006-03-07T19:55:44Z")

</div>

Please can anyone help a rookie.I have been trying to learn abou loops and diid a little experiment but its returning that one of my variables is undefined.

Here is the code below

var c:Array=[“doh”,“re”,“mi”,“fa”,“so”,“la”,“ti”,“do”];  
for(var i:Number=0;i\<c.length;i++){

trace(“notes “+c\*+” available”);  
result+=c\*+ newline;  
t\_txt.text=result;

}

on the output panel flash is writting undefinrd just before “doh”, like “undefineddoh”
