Skip to content

Instantly share code, notes, and snippets.

@think2011
Created January 21, 2015 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save think2011/50bac5c0087e71491e3f to your computer and use it in GitHub Desktop.
Save think2011/50bac5c0087e71491e3f to your computer and use it in GitHub Desktop.
九九乘法表
var i = 1, j = i, ret = '';
for(; i <= 9;) {
if(j > i) {
ret += '\n';
j = 1;
i++;
continue;
}
ret += j + ' * ' + i + ' = ' + i * j + ' ';
j++;
}
console.log(ret);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment