Skip to content

Instantly share code, notes, and snippets.

@olbrichj
Created June 14, 2018 17:27
Show Gist options
  • Save olbrichj/cd32d05a6d4b02e93b01cdd6b3c20f88 to your computer and use it in GitHub Desktop.
Save olbrichj/cd32d05a6d4b02e93b01cdd6b3c20f88 to your computer and use it in GitHub Desktop.
var x = 100
func calculate() {
var y = 0
for i in 1...1000 {
y += i
}
x = y
}
calculate()
print(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment