Page 81

Swift

import Cocoa

var intsA = [Int](count:2, repeatedValue: 2) var intsB = [Int](count:3, repeatedValue: 1) var intsC = [Int]()

println("intsA.isEmpty = \(intsA.isEmpty)") println("intsB.isEmpty = \(intsB.isEmpty)") println("intsC.isEmpty = \(intsC.isEmpty)") When the above code is compiled and executed, it produces the following result: intsA.isEmpty = false intsB.isEmpty = false intsC.isEmpty = true

69

​Quick is just a powerful and spontaneous programming language for macOS, iOS, watchOS and tvO...  

...

Advertisement