chasen
chasen

Really interesting that Swift has do, but it’s not what you think!

do {
    try throwingFunction1()
    nonThrowingFunction1()
} catch {
    print("Handle errors here")
}

In JS, that do would be try and no “try” is required before a throwing function.

Day 8 in the books! #100DaysOfSwiftUI

|
Embed
Progress spinner
imalexsimpson.bsky.social
imalexsimpson.bsky.social

@chasen It’s awesome that you’re learning Swift! Let me know if you need any help with anything ✨

|
Embed
Progress spinner
In reply to
chasen
chasen

@imalexsimpson.bsky.social Thanks Alex!

|
Embed
Progress spinner