One, Object
What is an object: The object in ECMAScript is actually a set of data and functions;
There are 2 ways to create an object type: A, using the new operator var person = new Object ();
Person.name = "Nicholas";
person.age = 29;
B, object literal notation: var person = {Name: "Nicholas", age:29}; Note that this is a comma separated, the last item of colleague can not have comma
When you access object properties, you use point notation such as Person.name
You can also use square bracket notation: person["name"]//The name here is enclosed in quotation marks;
It is important to note that if you use the square bracket operator, the key name must be enclosed in quotation marks, otherwise it will be treated as a variable. However, numeric keys can be unquoted, because they are treated as strings.
(Reference Links: http://javascript.ruanyifeng.com/grammar/object.html) and books (JS elevation 3)
Reference type 1