Swift代码库之数组array添加append另外一个数组
2019-08-01 本文已影响4人
iCloudEnd
Swift代码库之数组添加append另外一个数组
数据准备
var first = ["John", "Paul"]
let second = ["George", "Ringo"]
三种方法
first.append(contentsOf: second)
first += second
let third = first + second
var first = ["John", "Paul"]
let second = ["George", "Ringo"]
first.append(contentsOf: second)
first += second
let third = first + second