In the previous section, you declared constants and variables and assigned values to them. Swift determines the constant or variable type based on the value you supplied. This is called type inference. You can see the type of a constant or variable by holding down the Option key and clicking its name:
- Enter the following code and run it:
// Type inference
// Hold down option and click on the variable or constant name
// to disclose the type should be on one line
let cuisine = "American"
- Now hold down the Option key and click cuisine. You should see the following:

As you can see, cuisine is of the String type.
What if you want to set a specific type for a variable or constant? You'll see how to do that in the next section.