# 1.2.5.1.函數建構子、「new」與 JavaScript 的歷史

* function constructor: new
  * 使用new運算子建立物件
* 物件建立的方式
  * 1.[new Object](https://jenhsuan.gitbooks.io/javascript-node-js/content/chapter1/1231wu-jian-yu-300c-dian-300d.html)
  * 2.[object literals](https://jenhsuan.gitbooks.io/javascript-node-js/content/chapter1/1232wu-jian-yu-wu-jian-shi-ti.html)
  * new運算子

```
    //建立物件     
    function Person() {
        this.firstname = 'John';
        this.lastname = 'Doe';
    }

    //建立空物件
    //呼叫person, 並把this指到person上
    var john = new Person();
    //印出Person {firstname: "John", lastname: "Doe"}
    console.log(john)
```
