Any can represent an instance of any kind of type and AnyObject can represent an instance of a class type.
A constant or variable may refer to an instance of a subclass behind the scenes. In order to downcast them to their specific subclass , we can use the type cast operator ( as? or as!). As the downcast to a specific subclass may not succeed, the type cast operator comes in two forms. as? returns a optional value that […]