Please, forgive me as i\'m very new to swift, and programming in general.
Believe me when I say I\'ve tried hard to understand this, but I simply ca
Your print statement always prints out on every loop. Thats why you should put your that statement outside the foreach loop:
func loop() { for i in 0...<5 { print(i) } // it enters here when the loop is finished print("loop has finished") }