//高效的map let json={ name:'nl', skill:'web' }; console.log(json.name); var map=new Map(); map.set(json,'iam'); console.log(map); //下面看下set里面设置一对key,value值 map.set('nl',json); console.log(map); //map增删查 //get取值 console.log(map.get(json)); console.log(map.get('nl')); //delete删除特定的值,clear删除全部的值 map.delete(json); console.log(map); console.log(map.size); map.clear(); //has true false查找 console.log(map.has('nl')); //set get has delete clear size