{"action":"opened","issue":{"url":"https://api.github.com/repos/K0II/JavaScript/issues/1","repository_url":"https://api.github.com/repos/K0II/JavaScript","labels_url":"https://api.github.com/repos/K0II/JavaScript/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/K0II/JavaScript/issues/1/comments","events_url":"https://api.github.com/repos/K0II/JavaScript/issues/1/events","html_url":"https://github.com/K0II/JavaScript/issues/1","id":156128380,"number":1,"title":"new调用函数和普通调用函数的区别（一）","user":{"login":"K0II","id":19141974,"avatar_url":"https://avatars.githubusercontent.com/u/19141974?v=3","gravatar_id":"","url":"https://api.github.com/users/K0II","html_url":"https://github.com/K0II","followers_url":"https://api.github.com/users/K0II/followers","following_url":"https://api.github.com/users/K0II/following{/other_user}","gists_url":"https://api.github.com/users/K0II/gists{/gist_id}","starred_url":"https://api.github.com/users/K0II/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K0II/subscriptions","organizations_url":"https://api.github.com/users/K0II/orgs","repos_url":"https://api.github.com/users/K0II/repos","events_url":"https://api.github.com/users/K0II/events{/privacy}","received_events_url":"https://api.github.com/users/K0II/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-22T00:34:39Z","updated_at":"2016-05-22T00:34:39Z","closed_at":null,"body":"# new调用函数和普通调用函数的区别\r\n\r\n``` javascript\r\n\r\nfunction test() {\r\n　　this.name = 'Test';\r\n　　return function() { return true; }\r\n}\r\n\r\nvar bar = test();\r\nvar foo = new test();\r\n\r\ntypeof foo;    //  function\r\ntypeof bar;    //  function\r\n\r\nfoo;    // function()\r\nbar;    // function()\r\n\r\nfoo.name;    //  空字符串\r\nbar.name;    //  空字符串\r\n\r\nfoo();    //  true\r\nbar();    //  true\r\n\r\nfoo === bar;    //  false\r\n\r\nvar baz = test();\r\nbar === baz;    //  false\r\n\r\n```\r\n\r\n各种测试发现，没有区别，哪怕`foo === bar;    //  false` 也不意外"}}
{"actor":{"display_login":"K0II"}}