Created
March 22, 2012 17:44
-
-
Save tkh44/2160772 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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