const twoDimensionalArray = [[1, 2], [3, 4], [5, 6]];
const oneDimensionalArray = twoDimensionalArray.flat();
console.log(oneDimensionalArray); // 输出: [1, 2, 3, 4, 5, 6]
const twoDimensionalArray = [[1, 2], [3, 4], [5, 6]];
const oneDimensionalArray = twoDimensionalArray.flat();
console.log(oneDimensionalArray); // 输出: [1, 2, 3, 4, 5, 6]