📅  最后修改于: 2022-03-11 15:02:19.230000             🧑  作者: Mango
const anObj = {name: "Hi"};
const anArr = [{name: "Hi"}];
const wrapped1 = [anObj].flat()
const wrapped2 = [anArr].flat()
console.log(wrapped1); // wrapped1 is [{name: "Hi"}]
console.log(wrapped2); // wrapped2 is [{name: "Hi"}]