var str=new Array('');
for(......){
    str.push(......);
}
return str.join('');