Description for class. enum. func. protocol. struct. typealias. var.
– Class: A class is a blueprint for creating objects that define the properties and behavior of those objects. It can have properties, methods, and initializers.
– Enum: An enum, short for enumeration, is a data type that consists of a set of named values. It allows you to define a group of related values and work with them in a type-safe manner.
– Func: A func is a block of code that performs a specific task. It can take input parameters, perform some operations, and return a value. Functions are used to organize code into reusable pieces and improve code readability.
– Protocol: A protocol is a set of methods and properties that define a particular behavior or functionality. It defines a blueprint of methods that a class, struct, or enum can adopt and provide their own implementation.
– Struct: A struct is a data structure that encapsulates related properties and behavior. It is similar to a class but is value type, meaning it is copied when assigned to a new variable or passed as a function argument.
– Typealias: A typealias allows you to create an alternative name for an existing data type. It is useful for creating shorter and more expressive names for complex types or for renaming types to improve code readability.
– Var: A var is a keyword used to declare a mutable variable. It is used to store and manipulate data within a program. The value of a var can be changed throughout the program execution.