Key Concepts

Review core concepts you need to learn to master this subject

Structure Creation

struct Building { var address: String var floors: Int init(address: String, floors: Int, color: String) { self.address = address self.floors = floors } }

Structures, or structs, are used to programmatically represent a real-life object in code. Structures are created with the struct keyword followed by its name and then body containing its properties and methods.

Lesson 1 of 1

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo