Just experimenting with different inheritance techniques in JS, and came across something mildly discomfiting about Crockford\'s Prototypal Inheritance pattern:
If I log the object I can see: Object { foo="bar", baz=function()}
, so I don't understand your problem...
Anyway, can use Object.create() instead of Crockford's function:
var P = {
foo:'bar',
baz: function(){ alert("bang"); }
}
var C = Object.create (P);
console.log (C):
Object { foo="bar", baz=function()}