Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift Remove an Element from an Array

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

print("Initial Array: (languages)")

// remove element at index 1
let removedValue = languages.remove(at: 1)

print("Updated Array: (languages)")
print("Removed value: (removedValue)")
 
PREVIOUS NEXT
Tagged: #Swift #Remove #Element #Array
ADD COMMENT
Topic
Name
3+8 =