how optional in swift works internally code example
Example: declaring optionals swift
var myOptional: Any? // any can be replaced with whatever type you need
var myOptional: Any? // any can be replaced with whatever type you need