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
本文标题:Swift代码库之数组array添加append另外一个数组
本文链接:https://www.haomeiwen.com/subject/xpofdctx.html
网友评论