- Object
var person=new Object();
person.name="togeek";
person.age=29;
console.log(person);
var person2={
name:"简书",
age:3
}
console.log(person2);
var person3={}//相当于new Object()
person3.name="person3";
person3.age=45;
console.log(person3);
var person4={}//
person4.name="person4";
console.log(person4.name);
console.log(person4["name"]);//和上面是一样的
person4["first name"]="togeek";
console.log(person4["first name"]);//更多的时候是名称有特殊字符才使用的