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
The reason why your code doesn't work is because you have the println()
statement inside the loop, like this:
func loop() {
for var i=0; i<5; i++ {
println(i)
println("loop has finished")
}
}
So it prints out "Finished" every time the loop loops.
To fix this, all you need to do is put the println()
statement after the loop, like so:
func loop() {
for var i=0; i<5; i++ {
println(i)
}
println("loop has finished")
}
And voilà. Your app will now function properly!