var total = 0, count = 1;
while ( count <= 10) {
total = total + count;
count = count + 1;
}
# 1
while ( count <= 10) {
total = 0 + 1;
count = 1 + 1;
}
// total = 1
// count = 2
# 2
while ( count <= 10) {
total = 1 + 2;
count = 2 + 1;
}
// total = 3
// count = 3
# 3
while ( count <= 10) {
total = 3 + 3;
count = 3 + 1;
}
// total = 6
// count = 4
# 4
while ( count <= 10) {
total = 6 + 4;
count = 4 + 1;
}
// total = 10
// count = 5
# 5
while ( count <= 10) {
total = 10 + 5;
count = 5 + 1;
}
// total = 15
// count = 6
# 6
while ( count <= 10) {
total = 15 + 6;
count = 6 + 1;
}
// total = 21
// count = 7
# 7
while ( count <= 10) {
total = 21 + 7;
count = 7 + 1;
}
// total = 28
// count = 8
# 8
while ( count <= 10) {
total = 28 + 8;
count = 8 + 1;
}
// total = 36
// count = 9
# 9
while ( count <= 10) {
total = 36 + 9;
count = 9 + 1;
}
// total = 45
// count = 10
# 10
while ( count <= 10) {
total = 45 + 10;
count = 10 + 1;
}
// total = 55
// count = 11