Declare a function

 Problem

I want to declare a new function and call it.



 Recipe


// Declare our new function
func myFunc() {
    print("Hello from myFunc!")
}

// Call it
myFunc()


				

Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)

 

 Playground