可选参数值

函数

func sayGoodby(_ message: String = "Goodby!") {
    print(message)
}

sayGoodby()
//输出 "Goodby!"

sayGoodby("see you")
//输出 "see you"