Printing Variables and Constants
When you are prototyping your code with playgrounds, you automatically get output for any variable or constant that you are working with. But, if you are coding an application, you will need to use special functions to print out values to the console screen.
Since playgrounds have no console window, you will need to create a new Mac command-line tool to print values to a console screen.
Creating a Command-Line Tool
Open Xcode 6 and then choose Create a new Xcode project from the welcome screen.
On the screen that appears, choose OS X Application Command Line Tool.
On the next screen, ...