#JavaScript : The differences between …
===============
var F = function(){this.property = 3389;var field = 8080;this.get=function(){return field};};
var P = {myProperty:314159};
F.prototype = P;
var a = new F();
var b = Object.create(F.prototype);
var c = {};c.prototype = Object.create(F.prototype);
var d = Object.create(F);
var E = function(){};E.prototype = Object.create(F.prototype);
create a empty class(function object) with the prototype P. It means when P.myproperty changes, the D.prototype.myproperty changes, and the opposite will also be true. This syntax is used to class inheritance, you can add some logic in the braces to do more features include closure in subclass E. It’s same as b, when E.prototype.myProperty changes, the origional myProperty in P and F.prototype will not change.
###Wrapup:
var b = Object.create(object a)
create a new object b inherit all the properties and prototype properties of a. These inherited properties can just be read, when assign the value to them by use b.property, it create a new property directly under object b, the origin property in a does not change.
var b = Object.create(Function A.prototype)
create a new object b only inherit the A.prototype object but not inherit the property and method in A.
var B = function(){};B.prototype = Object.create(Function A.prototype)
create a new class B inherit class A with only the properties and methods defined in A.prototype.
var B = function(){};B.prototype = Object.create(new A())
create a new class B inherit class A with all properties and methods.