Product SiteDocumentation Site

5.3.6.31. removeItem


>>-removeItem(item)--------------------------------------------><

Removes an item from the array. If the target item exists at more than one index, the first located item is removed. Item equality is determined by using the == method of item. The return value is the removed item.

Example 5.155. Array class - removeItem method

a = .array~of("Fred", "Mike", "Mike", "David")
a~removeItem("Mike")  -- removes the item at index "2"