Contribute to Docs
.count property returns an integer that represents how many key-value pairs are in a dictionary.
var fruitStand = ["Apples": 12,"Bananas": 20,"Oranges", 17]print(fruitStand.count)// Output: 3
Learn Swift on Codecademy
Build iOS Apps with SwiftUILearn how to build iOS applications with Swift and SwiftUI and publish them to Apples' App Store.
Includes 7 Courses