Need Assistance?

support@tutorialshub.in

Optionals (Null Safety in Swift)

What Are Optionals (String?)?

ADVERTISEMENT
Swift Free Lesson
5 min read
ADVERTISEMENT

In Swift, regular variables can never be nil. When a value might be missing, wrap its type with a question mark (String?)—making missing values explicit and checked at compile time.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you