# Join strings together in loop

**URL:** <https://forum.kirupa.com/t/join-strings-together-in-loop/165524>\
**Category:** Uncategorized\
**Created:** [October 11, 2005, 7:21pm UTC](https://forum.kirupa.com/t/join-strings-together-in-loop/165524 "2005-10-11T19:21:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakepeg](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@jakepeg](https://forum.kirupa.com/u/jakepeg)\
**Post date:** [October 11, 2005, 7:21pm UTC](https://forum.kirupa.com/t/join-strings-together-in-loop/165524/1 "2005-10-11T19:21:00Z")

</div>

this should be easy but cannot get it to work:

[AS]var newXML;  
for(var i = 0; i \< oldXML.length; i++) {  
// join child nodes together in string var called newXML   
newXML = newXML + myXML.firstChild.firstChild.childNodes\*;  
}  
trace(newXML); [/AS]

have tried a number of methods including concat(), & etc. I know I’ll kick myself . . .
