Swift - Write program to Create a dictionary to store a user's info, such as username, password, and date of birth

Requirements

Write program to Create a dictionary to store a user's info, such as username, password, and date of birth

Demo

var userInfo = Dictionary<String, String>()
userInfo["username"] = "jason"
userInfo["password"] = "secret"
userInfo["dob"] = "31/01/1960"

print(userInfo["username"])

Related Exercise