NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

Checkpoint 9

Forums > 100 Days of SwiftUI

func rando(_ arrays: [Int]?) -> Int { arrays?.randomElement() ?? Int.random(in: 1...100)}

print(rando([17, 32, 55, 99]))
print(rando([]))

At first glance of the checkpoint I felt like I forgot everything but then I broke down challenge. Much easier than I thought originally, onto the review day!

   

Please Read

Please read this thread and the response from @twoStraws. See-> How to Post Progress

In short, please keep posting your progress. However, instead of a new post for each day, you can edit this post!

Instead of the title "Checkpoint 9", consider changing your post title to: jmac's Progress: Day 9 Complete! Next week it will read: jmac's Progress: Day 16 Complete! Keep changing the title as you progress.

Add to the post! After each milestone and challenge, post a snip of your progress, your quiz scores, and the concepts you found fun, or difficult. There are other articles, blog posts, or YouTube videos we can point you to, to help you solidify a concept, or to push your boundaries.

Keep coding!

   

Hacking with Swift is sponsored by Judo

SPONSORED Let’s face it, SwiftUI previews are limited, slow, and painful. Judo takes a different approach to building visually—think Interface Builder for SwiftUI. Build your interface in a completely visual canvas, then drag and drop into your Xcode project and wire up button clicks to custom code. Download the Mac App and start your free trial today!

Try now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.