keys属性和values属性
## keys属性:获取key数组; values属性:获取values数组;
var interestingNumbers = ["primes": [2, 3, 5, 7, 11, 13, 17],
"triangular": [1, 3, 6, 10, 15, 21, 28],
"hexagonal": [1, 6, 15, 28, 45, 66, 91]]
print(interestingNumbers.keys)
print(interestingNumbers.values)
# NJLog["triangular", "hexagonal", "primes"]
# NJLog[[1, 3, 6, 10, 15, 21, 28], [1, 6, 15, 28, 45, 66, 91], [2, 3, 5, 7, 11, 13, 17]]
网友评论