SOURCE

//页面输出1-100
//let i = 1
//while(i <= 100){
//    document.write(`输入次数${i}<br>`)
//    i++
//}

//页面输出1-100的累加和
let i = 1
let sum = 0 //sum是累加和的变量名
while(i <= 100 , i++){
    sum = sum + i   
    document.write(`累加和为${sum}`)
}
console 命令行工具 X clear

                    
>
console