- iOS 12 Programming for Beginners
- Craig Clayton
- 74字
- 2021-07-02 15:04:55
Why optionals?
So, now, you are probably asking yourself: "Why do you have to do this?". Trust me, when I first learned about optionals, I felt the same way. Using optionals helps to protect your code. For now, understand that when you see a data type followed by a question mark, this variable is an optional. As we work with optionals more and more throughout this book, it will become more evident to you.