1.创建实例 let map= new Map(); // 创建 2.对map的写入 // 要添加的对象 let obj1 = {name:'张三', sex:'boy',age: 21}; let obj2 = {name:'李四', sex:'boy',age: 23}; let obj3 = {name:'王五', sex:'boy',age: 22}; let obj4 = {name:'张三', sex:'girl',age: 18}; map.set(obj1.name,obj1);…