建立两个数组用于测试演示,需要注意的是first为可变数组 var first = ["张三", "李四"] let second = ["王五", "赵六"] 方法一 first.append(contentsOf: second) print(first) // ["张三", "李四", "王五", "赵六"] 方法二 first += second print(first) //["张三", "李四", "王五", "赵六"] 方法三 let third = first + sec…
建立两个数组用于测试演示,需要注意的是first为可变数组 var first = ["张三", "李四"] let second = ["王五", "赵六"] 方法一 first.append(contentsOf: second) print(first) // ["张三", "李四", "王五", "赵六"] 方法二 first += second print(first) //["张三", "李四", "王五", "赵六"] 方法三 let third = first + sec…