给定一个示例Array数组 var animals = ["cats", "dogs", "chimps", "moose"] Array删除第一个元素 animals.removeFirst() // "cats" print(animals) // ["dogs", "chimps", "moose"] Array删除最后一个元素 animals.removeLast() // "moose" print(animals) // ["cats", "dogs", "chimps"] Array删除…