面试题答案一键面试function filterArray<T>(arr: T[], callback: (element: T) => boolean): T[] { return arr.filter(callback); }