Printing out
It’s also useful to see the results of what your code is doing. In Swift, you can achieve this through the use of the print command.
print will output whatever you want to the debug area (sometimes referred to as the console).
For example, consider the following code:
print("Hello, Swift Apprentice reader!")
This will output a nice message to the debug area, like so:
You can hide or show the debug area using the button highlighted with the red box in the picture above. You can also click View\Debug Area\Show Debug Area to do the same thing.