Creating a Playground project
As you learned earlier, launch Xcode and click on Get started with a playground. The options screen for creating a new playground screen will appear:
Name your new Playground SwiftDiggingDeeper
, and make sure that your Platform is set to iOS
. Next, delete everything inside of your file and toggle on the Debug panel using the toggle button (Cmd + Shift + Y). You should now have a blank screen with the Results panel on the right and the Debug panel on the bottom opened.
We focused on the basics earlier—and now we will build upon those skills. Ranges are one such data type that we should learn and are very useful and can come in handy for a variety of reasons. Let's take a look at what Ranges are and then start to understand the difference between a closed Range and a half closed Range.