Created
February 23, 2015 01:06
-
-
Save safranck/3960f3b5cc03e7a62793 to your computer and use it in GitHub Desktop.
Times Tables in JavaScript using For Loop
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
//Print out times table up to 10 | |
for (var n=1; n<=10; n++) { | |
document.write('<div style="float: left; margin: 25px 10px;">') | |
for (i=1; i<=10; i++) { | |
document.write(n + ' x ' + i + ' = ' + n*i + '</br>'); | |
} | |
document.write('</div>') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can I create a time table exactly like the attached picture