How to remove multiple items from a swift array?

后端 未结 3 1521
孤城傲影
孤城傲影 2021-02-12 17:56

For example i have an array

var array = [1, 2, 3, 4]

I want to remove item at index 1 then at index 3 \"let it be in a for loop\".

But

3条回答
  •  鱼传尺愫
    2021-02-12 18:26

    It's simple. delete items from the end.

    First delete 3 and after that delete 1

提交回复
热议问题