var a = function a(){ this.x = 1; return this; } var l = { x:1 }; a.prototype.inc = function(){ return this.x+1; } l.inc = function(){ return this.x+1; } var b = new a(); var c = a(); console.log('b =',typeof b, b); console.log('c =',typeof c, c); console.log('l =',typeof l, l); console.log('b.x =', b.x); console.log('b.inc() = ',b.inc()); console.log('l.x =', l.x); console.log('l.inc() = ',l.inc()); console.log('c.x = ', c.x); console.log('c.inc() = ',c.inc()); /* b = object a {x: 1, inc: function} c = object Window {...} l = object Object {x: 1, inc: function} b.x = 1 b.inc() = 2 l.x = 1 l.inc() = 2 c.x = 1 Uncaught TypeError: undefined is not a function */