拉风的咖菲猫
JS 对象var o = { name: 'foo',
hey: 'bar'}console.log(o.name);
// => "foo"console.log(o['name']);
// => "foo"Map 对象上述普通的js对象只能用字符串做key,es6有个新特性,可以让“值”作为key 看例子:var m = new Map();
var eczn = { name: 'eczn', age: 20}
m.set(eczn, 'map Obj to Stirng');
console.log(m);