Skip to content

Instantly share code, notes, and snippets.

@caseybecking
Last active December 27, 2015 13:09
Show Gist options
  • Save caseybecking/7331508 to your computer and use it in GitHub Desktop.
Save caseybecking/7331508 to your computer and use it in GitHub Desktop.
Iterations with bold
<script type="text/javascript">
document.write('<table border="1" cellspacing="1" cellpadding="5">');
for(tableRows = 1; tableRows < 13; tableRows++){
document.write('<tr>');
for (tableColumns = 1; tableColumns < 13; tableColumns++){
if (tableRows === 1) {
document.write('<td><b>' + (tableRows * tableColumns) + '</b></td>');
}else if (tableColumns === 1 ){
document.write('<td><b>' + (tableRows * tableColumns) + '</b></td>');
}else{
document.write('<td>' + (tableRows * tableColumns) + '</td>');
}
}
document.write('</tr>');
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment