标签:length microsoft for ack ons comm sha end log
/*
* 输入数字3,生成3*3的数字乘法表。
* */
function mulTable(num) {
"use strict";
let table = new Array(num), len = table.length;
for (let i = 0; i < len; i++) {
table[i] = new Array(num);
}
for (let row = 0; row < len; row++) {
for (let col = 0, len = table[row].length; col < len; col++) {
table[row][col] =""+row+"*"+col+"=" +row * col;
}
}
return table;
}
console.log(mulTable(4));
**
标签:length microsoft for ack ons comm sha end log
原文地址:https://www.cnblogs.com/moyuling/p/8995638.html