1. 程式人生 > >swift基礎-資料型別-元組

swift基礎-資料型別-元組

 


//定義一個元組
let http500Error = (500,"internal sever error")
let (statusCode,statusMessage) = http500Error
statusCode
statusMessage

let person = (Name:"Jerry",Age:33)
person.Age
person.Name
person.0
person.1