Practical problems of mixin in js

in "JavaScript you don"t know", there is a paragraph about the inherited mixin implementation. The code is as follows:

function mixin( sourceObj, targetObj ) {//sourceObjtargetObjkey,targetObj
    for (var key in sourceObj) {
// 
        if (!(key in targetObj)) {
            targetObj[key] = sourceObj[key];
        }
    }
    return targetObj;
}
var Vehicle = {
    engines: 1,
    ignition: function() {
        console.log( "Turning on my engine." );
    },
    drive: function() {
        this.ignition();
        console.log( "Steering and moving forward!" );
    }
};
var Car = mixin( Vehicle, {
    wheels: 4,
    drive: function() {
        Vehicle.drive.call( this );
        console.log(
            "Rolling on all " + this.wheels + " wheels!"
        );
    }
} );


Car.drive();

the output is as follows:

Turning on my engine.
Steering and moving forward!
Rolling on all 4 wheels!

just called the drive () method. Why is the content in ignition () printed? Where is it used wrong?

Mar.04,2021

you called ignition


function mixin( sourceObj, targetObj ) {//sourceObjtargetObjkey,targetObj
    for (var key in sourceObj) {
// 
        if (!(key in targetObj)) {
            targetObj[key] = sourceObj[key];
        }
    }
    return targetObj;
}
var Vehicle = {
    engines: 1,
    ignition: function() {
        console.log( "Turning on my engine." );
    },
    drive: function() {
        this.ignition();//CarCarignition
        console.log( "Steering and moving forward!" );
    }
};
var Car = mixin( Vehicle, {//Car
    wheels: 4,
    drive: function() {
        Vehicle.drive.call( this );//Vehicle.drivethis
        console.log(
            "Rolling on all " + this.wheels + " wheels!"
        );
    }
} );


Car.drive();
in drive .
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea6428-47b97.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea6428-47b97.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?