Created
October 20, 2015 03:21
-
-
Save KevinTCoughlin/b7e2b746ed9fc0e21ea5 to your computer and use it in GitHub Desktop.
JavaScript print multiplication table NxN
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
| function printMultiplicationTable(n) { | |
| for (var i = 1; i < n; i++) { | |
| var str = ''; | |
| for (var k = 1; k < n; k++) { | |
| str += i * k + '\t'; | |
| } | |
| console.log(str); | |
| } | |
| } | |
| printMultiplicationTable(12); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment