Check out example codes for "swift declare optional values". It will help you in understanding the concepts better.

Code Example 1

// Optional values are types that can contain nil
var optionalValue: String? // this can be done with more than strings, but for this example that's what was used

Learn ReactJs, React Native from