My contacts

Report a typo

Assume that you have a contacts object like this:

const contacts = {
    "John Doe": {
        email: "[email protected]",
        phone: "+1 123 456 7890"
    },
    "Jane Smith": {
        email: "[email protected]",
        phone: "+1 234 567 8901"
    },
};

Complete the function below that uses the entries() method to iterate over this object and prints a detailed contact list.

Fill in the gaps with the relevant elements
function printContactInfo(contacts) {
    Object.(contacts).(([name, info]) => {
        console.log(`Name: ${name}, Email: ${info.email}, Phone: ${}`);
    });
}

Create a free account to access the full topic