Hi
I would like to use the function find_max() to highlight the highest grade. In this case should be Larry.Please advise. Many Tanks.
<script language="JavaScript">
var grades[[50,"James"],[70,"Pete"],[65,"Mary"],[90,"Larry"],[80,"John"],[40,"George]];
document.write("<table border='1');
document.write("<tr bgvolor='silver'>")
document.write("<td width='100'><strong>Name</strong></td");
document.write("td width='200' align='center'><strong>Grade</strong></td>");
document.write("</tr>");
for(var i in grade){
document.write("<tr>");
for(var j in grades){
document.write("<td>"+grades[j]+"</td>");
}
document.write("</tr>");
}
document.write("</table>");
</script>
I would like to use the function find_max() to highlight the highest grade. In this case should be Larry.Please advise. Many Tanks.
<script language="JavaScript">
var grades[[50,"James"],[70,"Pete"],[65,"Mary"],[90,"Larry"],[80,"John"],[40,"George]];
document.write("<table border='1');
document.write("<tr bgvolor='silver'>")
document.write("<td width='100'><strong>Name</strong></td");
document.write("td width='200' align='center'><strong>Grade</strong></td>");
document.write("</tr>");
for(var i in grade){
document.write("<tr>");
for(var j in grades){
document.write("<td>"+grades[j]+"</td>");
}
document.write("</tr>");
}
document.write("</table>");
</script>