Type Your Code Here

let toyota = { drive() { return 'driving toyota'; } } // Defines an object toyota with a drive method let camry = { wifi() { return 'carry'; } } // Defines an object camry with a wifi method // Set toyota's __proto__ to camry's __proto__'s __proto__ Object.setPrototypeOf(camry, toyota); console.dir(camry); // Prints the camry object console.log(camry.wifi()); // Outputs: carry

Output: