{"id":692,"date":"2017-02-14T10:43:33","date_gmt":"2017-02-14T18:43:33","guid":{"rendered":"http:\/\/www.tech.dimprash.com\/?p=692"},"modified":"2017-02-14T10:58:48","modified_gmt":"2017-02-14T18:58:48","slug":"difference-between-object-create-and-new-somefunction","status":"publish","type":"post","link":"http:\/\/www.tech.dimprash.com\/?p=692","title":{"rendered":"Difference between Object.create() and new SomeFunction()"},"content":{"rendered":"<p>The object used in Object.create actually forms the prototype of the new object, where as in the new Function() form the declared properties\/functions do not form the prototype.<\/p>\n<p>Very simply said, new X is Object.create(X.prototype) with additionally running the constructor function. (And giving the constructor the chance to return the actual object that should be the result of the expression instead of this.)<\/p>\n<p>http:\/\/adripofjavascript.com\/blog\/drips\/basic-inheritance-with-object-create.html<\/p>\n<p>http:\/\/stackoverflow.com\/questions\/4166616\/understanding-the-difference-between-object-create-and-new-somefunction<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The object used in Object.create actually forms the prototype of the new object, where as in the new Function() form the declared properties\/functions do not form the prototype. Very simply said, new X is Object.create(X.prototype) with additionally running the constructor function. (And giving the constructor the chance to return the actual object that should be &hellip; <a href=\"http:\/\/www.tech.dimprash.com\/?p=692\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Difference between Object.create() and new SomeFunction()<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-692","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=692"}],"version-history":[{"count":3,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/692\/revisions"}],"predecessor-version":[{"id":697,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/692\/revisions\/697"}],"wp:attachment":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=692"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}