> For the complete documentation index, see [llms.txt](https://jen-hsuan-hsieh.gitbook.io/javascript-node-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jen-hsuan-hsieh.gitbook.io/javascript-node-js/chapter1/12javascript-quan-gong-lve-ff1a-ke-fu-js-de-qi-guai-bu-fen/123wu-jian-yu-han-shu/1231wu-jian-yu-300c-dian-300d.md).

# 1.2.3.1.物件與「點」

* 物件是Name/ value pair的集合
  * 具有屬性與方法
    * Primitive "Property": [六種純值](https://jenhsuan.gitbooks.io/javascript-node-js/content/chapter1/122xing-bie-yu-yun-suan-zi/1222chun-zhi.html)
    * Object "Property": 物件可以連結另一個物件
    * Function "Property": 物件可以有方法
  * 主要的物件有自己的記憶體位置
    * 參照到property的記憶體位置
* 建立物件與取用property

  ```
    var person = new Object();

    //純值
    person["firstname"] = "Tony";

    //兩種方式取值
    console.log(person[firstNameProperty])
    var firstNameProperty = "firstname";
    console.log(person.firstname)

    //物件 (sub object)
    person.address = new Object();
    person.address.street = "111 main st.";
    person.address.city = "new york";
  ```
*
