📜  array.flat - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:16.898000             🧑  作者: Mango

代码示例4
const arrays = [
      ["$6"],
      ["$12"],
      ["$25"],
      ["$25"],
      ["$18"],
      ["$22"],
      ["$10"]
    ];
const merge3 = arrays.flat(1); //The depth level specifying how deep a nested array structure should be flattened. Defaults to 1.
console.log(merge3);