SOURCE

var count1=0;
var num=0;
while(num<100){
num++;
count1+=num;

}

document.write(count1+"<br>")
count1=0;
num=0;

do{
num++;
count1+=num;
}while(num<100);

document.write(count1+"<br>")

count1=0;
for(i=1; i<=100;i++){
count1+=i;
}
document.write(count1+"<br>")
console 命令行工具 X clear

                    
>
console