You can't add a property to undefined.
var foo = new Object();
foo.prototype; // undefined
Object.getPrototypeOf(foo); // prototype of all objects
To create an Object with it's own prototype, use Object.create
var proto = {},
foo = Object.create(proto);
foo.prototype; // still undefined
Object.getPrototypeOf(foo) === proto; // true
Alternatively, use new
with a dummy function
var Obj = function () {},
proto = Obj.prototype = {};
var foo = new Obj;
foo.prototype; // again still undefined
Object.getPrototypeOf(foo) === proto; // true
Once you have the prototype from these last two, you can use it as normal
proto.display = function () {console.log('display');};
foo.display();