for(var j=0, row, h=''; (row=this.map[j]); j++,h=''){ for(var i=0, cell; (cell=row[i]); i++){ h += cell.r + ',' + cell.c + ' '; } console.log(h); }