(function(){
var personProto = {
describe : function(){
alert("NAME IS "+this.name);
}
};
var jane = {
name : "JANE",
__proto__ : personProto
};
var tarzan = {
name : "TARZAN",
__proto__ : personProto
};
jane.describe();
})();
in the above code for the last line i am getting an error "Object
doesn't support this property or method",
But what i am expecting is object "jane" must inherit method describe
from object "personProto"
can anyone please help me out
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]