Build a Plant Nursery Catalog - Step 8

Tell us what’s happening:

Hello, I’m not sure if this issue is tied to my browser, but the console returns [object Object] => [object Object] pairs instead of the intended expanded objects as keys and values. I haven’t checked the browser console yet, but a JavaScript playground website does return the key value pairs correctly.

Starting this step, the console returns…

Map(2) {[object Object] => [object Object], [object Object] => [object Object]}
2

Your code so far

const ballerina = {
    commonName: "Spanish lavender",
    scientificName: "Lavandula stoechas",
    cultivar: "Ballerina"
}

const prettyPolly = {
    commonName: "Spanish lavender",
    scientificName: "Lavandula stoechas",
    cultivar: "Pretty Polly"
}

const willowVale = {
    commonName: "Spanish lavender",
    scientificName: "Lavandula stoechas",
    cultivar: "Willow Vale"
}

const hidcote = {
    commonName: "English lavender",
    scientificName: "Lavandula angustifolia",
    cultivar: "Hidcote"
}

const imperialGem = {
    commonName: "English lavender",
    scientificName: "Lavandula angustifolia",
    cultivar: "Imperial Gem"
}

const royalCrown = {
    commonName: "French lavender",
    scientificName: "Lavandula dentata",
    cultivar: "Royal Crown"
}

// User Editable Region

const catalog = new Map();
catalog.set(ballerina, { small: 20, medium: 15, large: 12 });
catalog.set(prettyPolly, { small: 31, medium: 14, large: 24 });


// User Editable Region

console.log(catalog);
console.log(catalog.size);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0

Please post a link to this workshop. Thank you.

https://www.freecodecamp.org/learn/javascript-v9/workshop-plant-nursery-catalog/step-8

Like this? I should also note that my browser is LibreWolf, which may break a bit of functionality. The playground I’ve used is this…
https://runjs.app/play

Hi there,

Yes. Thank you for the link.

Maybe you should try looking in your browser’s console?

Also, it looks like you need to finish the code for this step.

Happy coding!

Ah no worries, I asked just before actually getting on to it. The browser’s console returns the intended map with the two objects (ballerina and prettyPolly), instead of:

Map(2) {[object Object] => [object Object], [object Object] => [object Object]}
2

I’m wondering, is it a website issue?