var myCar2 = {
maxSpeed: 70,
driver: "Arnold",
drive: function(speed, time) {
console.log("speed " + (speed * time));
},
logbook: function(a , b) {
console.log("max speed " + this.maxSpeed + " " + this.drive(a , b));
}
};
myCar2.logbook(3 , 6);
If I run that code this.drive(a , b) is undefined. How can i pass variables to drive() function using logbook()?
drive, so its return value isundefined.