Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift Remove an Element from a Set

var languages: Set = ["Swift", "Java", "Python"]

print("Initial Set: (languages)")

// remove Java from a set
let removedValue = languages.remove("Java")

print("Set after remove(): (languages)")
 
PREVIOUS NEXT
Tagged: #Swift #Remove #Element #Set
ADD COMMENT
Topic
Name
7+9 =