Flat 2020-3-25

# θΎ“ε‡Ίζ˜―δ»€δΉˆ

const emojis = ["πŸ₯‘", ["✨", "✨", ["πŸ•", "πŸ•"]]];

console.log(emojis.flat(1));
  • A: ['πŸ₯‘', ['✨', '✨', ['πŸ•', 'πŸ•']]]
  • B: ['πŸ₯‘', '✨', '✨', ['πŸ•', 'πŸ•']]
  • C: ['πŸ₯‘', ['✨', '✨', 'πŸ•', 'πŸ•']]
  • D: ['πŸ₯‘', '✨', '✨', 'πŸ•', 'πŸ•']

# 参考