Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift Remove an Element from a Dictionary

var studentID = [111: "Eric", 112: "Kyle", 113: "Butters"]

print("Initial Dictionary: ", studentID)

var removedValue  = studentID.removeValue(forKey: 112)

print("Dictionary After removeValue(): ", studentID)
 
PREVIOUS NEXT
Tagged: #Swift #Remove #Element #Dictionary
ADD COMMENT
Topic
Name
9+9 =