📘return

Swiftflow controlcontrol transfer ⟩ return

for n in 1...10 {
    if n == 3 { return }    // ⛔ error
    //          ^^^^^^
    // ⛔ error: return invalid outside of a func
}

Last updated

Was this helpful?