Daily iOS
Swift

Any, AnyObject, NSObject

What can Any, AnyObject, and NSObject each hold?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Any holds any type, including values and functions; AnyObject is class-only and holds just class instances; NSObject holds instances of the Objective-C runtime's root class.

Share a question