Type Your Code Here

// Define a new function called Object.values which takes an object as input Object.values = function(object) { // Initialize an empty array to store the values var values = []; // Iterate through each property in the object for(var property in object) { // Push the value of each property into the values array values.push(object[property]); } // Return the array containing the values of the object's properties return values; } // Create an object named foo with properties 'a', 'b', and 'c' with corresponding values var foo = {a:1, b:2, c:3}; // Output the values of the properties of foo using the custom Object.values function console.log(Object.values(foo));

Output: