📜  javascript代码示例中的for循环求和

📅  最后修改于: 2022-03-11 15:01:50.603000             🧑  作者: Mango

代码示例1
let sum = 0;
for (let i = 1; i <= 6; i++) {
    sum = sum + i;
}
console.log(sum)
//Output: 21