Skip to content

Instantly share code, notes, and snippets.

@tkh44
Created March 22, 2012 17:44
Show Gist options
  • Save tkh44/2160772 to your computer and use it in GitHub Desktop.
Save tkh44/2160772 to your computer and use it in GitHub Desktop.
var table = [
["Person", "Age", "City"],
["Sue", 22, "San Francisco"],
["Joe", 45, "Halifax"]
];
for(var row = 0; row < table.length; row++){
var rowText = "";
for(var column = 0; column < table[row].length; column++){
if(c != table[column].length-1){
rowText += table[row][column] + " ";
}else{
rowText += table[row][column];
}
}
console.log(rowText);
//loop repeats on next row down
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment