I am trying to figure out why object three won't access traits from object two when i use the document.write feature.
when I try to use this code on JS Bin "hello does not pop up on the screen like i would expect it to.
var two = {jack : 3,
hello : "hello",
bye : "bye"};
var three = inherit(two);
document.write(three.hello);
can someone explain what is wrong with this code.
inherit
function come from? You may wantvar three = Object.create( two)
instead. – Zach Dennis Mar 20 at 1:49