Closed madamowicz closed 1 year ago
Context: https://go.dev/tour/flowcontrol/1
Not sure why, but when I run the code in this example (in the web browser as it is) it returns 45 instead of 10
45
10
1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 == 45
45 is the expected output.
OMG, you are obviously right. It was too early in the morning and I wore sum += 1 :facepalm: Forgive me that.
sum += 1
Context: https://go.dev/tour/flowcontrol/1
Not sure why, but when I run the code in this example (in the web browser as it is) it returns
45
instead of10