Chapter 2
Playing in the Playground
In This Chapter
Trying out code in a playground
Spotting syntax errors in a playground
Observing values as code runs
One of the important features of Swift and Xcode 6 is the playground, a tool that you can use to experiment with syntax and code to get immediate response. You’ll use playgrounds frequently in the exercises in this book to explore snippets of syntax.
You can build a playground for a section of code that you want to test repeatedly, but you can also create a playground to test code on the fly. When your test is complete, you can keep the playground or just throw the playground away.
This chapter provides an overview of playgrounds. Stepping through the examples in this chapter can help you get the hang of playgrounds and allow you to explore some basic Swift snippets.
Get Swift For Dummies 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.