📜  为循环打字稿代码示例创建一个数组

📅  最后修改于: 2022-03-11 14:48:36.656000             🧑  作者: Mango

代码示例1
loopTimes: number[] = Array(31);

for (let x = 0; x < loopTimes.length; x++) {
    console.log('Index/Loop No: ', [x]);
    // Do something here...
}