> 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/1232wu-jian-yu-wu-jian-shi-ti.md).

# 1.2.3.2.物件與物件實體

* 當JavaScript engine 看到大括號時, 就會假設在創造一個物件
  * 物件實體 (object literals)

    ```
    //物件實體語法
    var person = {
      firstname:  'Tony', 
      lastName: 'Alicea',
      address: {
          street: "111 main st.";
          city = "new york";
      }
    };

    function greet(person){
      console.log('Hi' + person.firstname);
    }

    greet(Tony);
    greet({firstname: 'Mary', lastname: 'Doe'});
    ```
* 因為JavaScript code並不是真正被處理, 而是經過JavaScript engine處理過, 因此可以有多種寫法
