The chapters in this section will introduce you to the very basics of programming in
Swift. From the fundamentals of how computers work all the way up to language
structures, you’ll cover enough of th
e language to be able to work with data and
organize your code’s behavior.
The section begins with some groundwork to get you started:
• Chapter 1, Coding Essentials & Playground Basics: This is it, your whirlwind
introduction to the world of programming! You’ll begin with an overview of
computers and programming, and then say hello to Swift playgrounds, which are
where you’ll spend your coding time for the rest of this book.
Next, you’ll learn the basics of data in Swift:
• Chapter 2, Expressions, Variables & Constants: You’ll start by learning some
basics such as code comments, arithmetic operations, constants and variables.
These are some of the fundamental building blocks of any language, and Swift is
• Chapter 3, Types & Operations: You’ll learn about handling different types,
including strings which allow you to represent text. You’ll learn about converting
between types and you’ll also be introduced to type inference which makes your
life as a programmer a lot simpler. You’ll learn about tuples which allow you to
make your own types made up of multiple values of any type.
Once you have the basic data types in your head, it’ll be time to do things with that
• Chapter 4, Basic Control Flow: You’ll learn how to make decisions and repeat
tasks in your programs by using syntax to control the flow. You’ll also learn about