Issues with JavaScript inheritance implementation

I have defined a base object as follows:

var Human = function() {
    this.isTalkative = true;
}

I created a method intended for all derived objects:

Human.prototype.introduce = function() {
    if (this.isTalkative) {
        console.log('Hello, my name is ' + this.fullName);
    }
}

Next, I created a derived object, ‘TeamMember’:

var TeamMember = function(fullName, role) {
    Human.call(this);
    this.fullName = fullName;
    this.role = role;
}

Upon instantiation:

var joe = new TeamMember('Joe Smith', 'Web Designer');
doe.introduce();

However, I’m encountering an error: Uncaught TypeError: joe.introduce is not a function. What might be the issue here?

You're missing inheritance setup. Add this line to connect the prototypes:

TeamMember.prototype = Object.create(Human.prototype);
TeamMember.prototype.constructor = TeamMember;

This makes TeamMember inherit Human's methods.

Also, ensure you call introduce on joe, not doe:

joe.introduce();