Write Your JavaScript Code Here

let raay = { drive() { return 'Add raay'; } } // Defines an object raay with a drive method let naty = { net() { return 'use net'; } } // Defines an object naty with a net method // Set raay's __proto__ to naty's __proto__'s __proto__ Object.setPrototypeOf(naty, raay); console.dir(naty); // Prints the naty object console.log(naty.net()); // Outputs: use net console.log(naty.drive()); // Outputs: Add raay

Output: