📌  相关文章
📜  使用自定义键将数组转换为对象 - Javascript 代码示例

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

代码示例2
const yourArray = ['Jimbo', '555-555-5555', 'jimbo@aol.com'];

const [name, phone, email] = yourArray;
const yourObject = { name, phone, email };

console.log(yourObject);
 Run code snippet