Swift 数组

2019-06-13  本文已影响0人  CaptainRoy
var emptyArray = [String]()
var list = ["one","two","three"]
var listTemp = ["zero"]
var resultArray = list + listTemp
print(resultArray) // ["one", "two", "three", "zero"]
var list = ["one","two","three"]
list.append("four")
print(list) // ["one", "two", "three", "four"]
list = []
var list = ["one","two","three"]
list.insert("zero", at: 0)
print(list) // ["zero", "one", "two", "three"]
上一篇 下一篇

猜你喜欢

热点阅读