For loop in swift

other
voted: 0
vote
swift

Simple for loop in swift to display dictionary

func printDict() {
        let simpleDictionary = ["leg": 2, "head": 1, "arm": 2, "fingers": 20]
        for (part, count) in simpleDictionary {
            NSLog("\(part): \(count)")
        }
    }
working url: not entered
version: not entered
Leave a Comment:
Characters left:
No comments yet.