Created
August 18, 2016 05:08
-
-
Save mosluce/4e90ad30cccfca1ccdd54beae17467de to your computer and use it in GitHub Desktop.
Swift Function: 無限參數
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| func hello(people: String...) { | |
| for person in people { | |
| let str = "Hello \(person)" | |
| print(str) | |
| } | |
| } | |
| hello("mos", "pofat", "yuyu") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment