The control variable i gets added to sum every time the for loop is executed; the growing-string log keeps record.
i
sum
log