Swift 2.0 Learning Notes-My first line of Swift code
When I first saw the following code, I petrified, what is the code? The words spelled out?
Import Foundation
var str = "Hello World"
Print (str)
Dizzy, okay, keep your head down and look down, oh, yes.
First sentence: Import Foundation
Represents the introduction of the foundation framework.
What is the foundation framework?
Foundation is the framework for OS X and iOS application development, which includes basic classes such as numbers, strings, arrays, dictionaries, and so on.
The cocoa framework is a framework that requires several frameworks for OS X development including: AppKit and foundation. The Uikit framework is a framework for developing iOS graphical user interfaces, including common views and view controllers.
Second sentence: var str = "Hello World"
Declare the str variable, VAR represents the declared variable.
Third sentence: print (str)
Print (_:) is a function that can output variables or constants to the console.
Swift 2.0 Learning Notes-My first line of Swift code