📜  js .flat - Javascript 代码示例

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

代码示例2
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);