Simple Values and Types

Now that you have had a short tour of Xcode, let's look at the Swift programming language.

For more information about the latest version of the Swift language, visit https://docs.swift.org/swift-book/.

First, you'll explore Swift playgrounds, an interactive environment where you can type in Swift code and have it execute and display results immediately. You'll study how Swift stores various types of data, and how it performs operations on that data. You'll also look at some cool Swift features such as type inference and type safety, which help you to write code more concisely and avoid common errors. Finally, you'll learn how to perform common operations on data and how to print messages to the Debug area to help you troubleshoot issues.

By the end of this chapter, you should be able to write simple programs that can process letters and numbers.

The following topics will be covered:

  • Understanding Swift playgrounds
  • Exploring data types
  • Exploring constants and variables
  • Understanding type inference and type safety
  • Exploring operators
  • Using the print() function
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.130.31