All good computer books that are written to teach a computer language have a section that shows a user how to write a Hello World application. This book is no exception. In this section, we will show you how to write two different Hello World applications.
Our first Hello World application will be a traditional Hello World application that simply prints Hello World to the console. Let's begin by creating a new Playground and naming it Chapter_1_Hello_World.
In Swift, to print a message to the console, we use the print() function. In its most basic form, we would use the print function to print out a single message, as shown in the following code:
Usually, when we use the print() function, we want to print ...