想知道,如何在Swift中按奇/偶/奇/偶排序数组? 请参见下面的示例:
let exampleArray = ["a", "b", "c", "d", "e", "f"]
let oddExampleArray = exampleArray[???PLEASE HELP??] // Would Print "a", "c", "e"
let evenExampleArray= exampleArray[???PLEASE HELP???] // Would Print "b", "d", "f"