函数表现 Posted on 2019-09-28 Edited on 2019-10-16 In JavaScript 1234function arrayMove<T>(array: T[], oldIndex: number, newIndex: number): T[] { [array[oldIndex], array[newIndex]] = [array[newIndex], array[oldIndex]]; return array;}