// 实现一个函数，从两个数组中轮流插入新数组
export const mergeArrays = (arr1: any[], arr2: any[]) => {
    const result: any[] = [];
    const maxLength = Math.max(arr1.length, arr2.length);
    for (let i = 0; i < maxLength; i++) {
        if (i < arr1.length) result.push(arr1[i]);
        if (i < arr2.length) result.push(arr2[i]);
    }
    return result;
};
