var total = 0; var i = 1; while(i < 101){ total += i; i++; } console.log(total)
while求和(1到100)
原文:https://www.cnblogs.com/ly-qingqiu/p/12156105.html