# Name/Variable Titles in a for loop

**URL:** <https://forum.kirupa.com/t/name-variable-titles-in-a-for-loop/331866>\
**Category:** flash\
**Created:** [November 12, 2013, 5:14pm UTC](https://forum.kirupa.com/t/name-variable-titles-in-a-for-loop/331866 "2013-11-12T17:14:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottiescotsman](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@scottiescotsman](https://forum.kirupa.com/u/scottiescotsman)\
**Post date:** [November 12, 2013, 5:14pm UTC](https://forum.kirupa.com/t/name-variable-titles-in-a-for-loop/331866/1 "2013-11-12T17:14:30Z")

</div>

Hi there,  
Just wanted to ask a silly little question.

Say for instance I have a variable name … e.g. house0-6…car0-6 .door0-6  
how do I add the number to the variable name such as house1 or car6 within a loop.

[AS]  
var \_d:Date = new Date();  
for (var i:Number=1; i\<=6;i++){  
if (\_d.day==i){  
“DAY”+i.visible = true;  
} else {  
“DAY”+i.visible = false;  
}  
}  
[/AS]

Thanks in advance:look:
