📜  map JavaScript 映射对象中的键值 - Javascript 代码示例

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

代码示例1
const map = {"a": 1, "b": 2, "c": 3};
const mapped = Object.entries(map).map(([k,v]) => `${k}_${v}`);
console.log(mapped);