I need help create a table through an array and also separating the parts in to different category. I am using a for loop. right now I got the table form but I need help separating the different fields. this what I got so far.
<!DOCTYPE HTML>
<html lang="en">
<head>
<script type="text/javascript">
<!--
var rawteamstats = new Array;
rawteamstats[0] = [Teams:"Sharks",Wins:"3",Loss:"1",Ties:"2"];
rawteamstats[1] = [Teams:"Jets",Wins:"2",Loss:"4",Ties:"1"];
rawteamstats[2] = [Teams:"AppleDumplings",Wins:"3",Loss:"3",Ties:"1"];
rawteamstats[3] = [Teams:"MightyShrimp",Wins:"1", Loss:"5",Ties:"0"];
rawteamstats[4] = [Teams:"Volcano",Wins:"2", Loss:"2",Ties:"2"];
rawteamstats[5] = [Teams:"Phoniox",Wins:"2",Loss:"3",Ties:"1"];
//-->
</script>
<title>Baseball Standing</title>
</head>
<body>
<p id="demo"></p>
<script>
var rawteamstats, text, TLen, i;
tLen = rawteamstats.length;
text = "<table border=1>";
for (i = 0; i < tLen; i++) {
text += "<tr>"+"<td>" + rawteamstats[i] + "</td>"+"</tr>";
}
text += "</table>";
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>