SOURCE

var total=0;
var total1=0;
var total2=0;
var j=1;
var n=1;

for(var i=1;i<=100;i++){
	total+=i;
}
while(j<=100){
	total1+=j;
	j++;
}
do{
	total2+=n;
	n++;
}while(n<=100)
	
	document.write("for循环"+total);
document.write("<br/>for循环"+total1);
document.write("<br/>for循环"+total2);
console 命令行工具 X clear

                    
>
console