本文共 600 字,大约阅读时间需要 2 分钟。
var menu:[String] = [“1”,“2”,“3”]
print(menu.count)
print(menu[0])
menu+=[“4”,“5”]
menu+=[“6”,“7”]
print(menu.count)
print(menu[1…3])
let constantName=1
print(constantName)
let decimalInteger=17
let binaryInteger=0b10001
let octalInteger=0o21
let hexadecimalInteger=0x11
print(decimalInteger)
print(binaryInteger)
print(octalInteger)
print(hexadecimalInteger)
var company: = [
“APPL”: “Apple Inc”, “GOOG” : “Google Inc”, “AMZN” : “Amazon.com Inc”, “FB” : “Facebook Inc” ]print(company[“APPL”]!)//if this value may become empty, and the ! may help solve the optional one back to the ordinary variable
转载地址:http://jbccf.baihongyu.com/