Course Description
A fundamental part of any programming language is the use of variables and constants—placeholders for your data. In this module, you’ll learn how to use the Swift built-in keywords of “let” for constants and “var” for variables, and you’ll learn how to assign those keywords to these placeholders for your information.
Variables and constants can hold different types of data, and in this module, you’ll begin your exploration of those types. We’ll start with the basic data types, including strings. You’ll learn how to manipulate strings and how to use concatenation to bring different strings together. You’ll also learn how to use string interpolation, which is Swift’s improved variation of concatenation. In addition, you’ll learn about the number data type, including the whole number data type called Int and the decimal number data type called Double. You’ll also gain deeper insight into the Boolean data type, which you can use to set a variable or constant to “true” or “false” and then evaluate that condition later in your logic.
What You'll Learn
- Use the Swift keywords "let" for constants and "var" for variables to hold your data
- Describe variables and constants as placeholders for information
- Manipulate strings and combine them using concatenation and Swift's string interpolation
- Work with number data types, including the whole number type Int and the decimal type Double
- Explain the Boolean data type to set values to "true" or "false" and evaluate that condition in your logic
- Work with variables, constants, and tuples in Swift
Key Takeaways
- Variables and constants are placeholders for your data, and Swift uses the keyword "let" for constants and "var" for variables.
- Variables and constants can hold different types of data, including basic data types such as strings.
- String interpolation is Swift's improved variation of concatenation for bringing strings together.
- Swift's number data type includes the whole number type called Int and the decimal number type called Double.
- The Boolean data type can set a variable or constant to "true" or "false" so the condition can be evaluated later in your logic.
Frequently Asked Questions
What topics does this Swift module cover?
This module covers using variables and constants with the "let" and "var" keywords, basic data types including strings, string manipulation through concatenation and string interpolation, the number data types Int and Double, and the Boolean data type. Its lessons are Variables, Constants, and Tuples; Strings and String Interpolation; Numbers; and Booleans.
Who is this course for?
As indicated by the title "Swift Beginner: Data and Variables," this module is aimed at beginners starting their exploration of data types in the Swift programming language.
What skills will I gain from this course?
The course develops skills in Swift (Programming Language), Data Binding, Data Definition Language, Local Variables, and Visual Programming Language (VPL).
What is string interpolation in Swift?
String interpolation is Swift's improved variation of concatenation, which is used to bring different strings together.
What is the difference between "let" and "var" in Swift?
In Swift, "let" is the built-in keyword for constants and "var" is the keyword for variables; both are assigned to placeholders that hold your data.









