Playing in a Playground

As you can see in Figure 1.4, a Swift playground opens with two sections. On the left, you have the Swift code editor. On the right, you have the results sidebar. The code in the editor is evaluated and run, if possible, every time the source changes. The results of the code are displayed in the results sidebar.

Figure 1.4 Your new playground

Screenshot shows a Swift playground titled MyPlayground with two panes, Swift code editor on the left and results sidebar on the right.

Let’s take a look at your new playground. Notice that the first line of text is ...

Get Swift Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.