var i=1; var count=0; while(i<=100){ count+=i; i++; } document.write(count+'<br\>'); var m=1; var count1=0; do{ count1+=m; m++; }while(m<=100); document.write(count1+'<br\>'); var sum=0; for(var i=1;i<=100;i++){ sum+=i; } document.write(sum)