Build a Plant Nursery Catalog - Step 11

Tell us what’s happening:

Hello there,
do you have any advice about this question, please?

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"
}

const catalog = new Map();
catalog.set(ballerina, { small: 20, medium: 15, large: 12 });
catalog.set(prettyPolly, { small: 31, medium: 14, large: 24 });
catalog.set(willowVale, { small: 3, medium: 5, large: 0 });
catalog.set(hidcote, { small: 33, medium: 13, large: 18 });
catalog.set(imperialGem, { small: 19, medium: 35, large: 28 });
catalog.set(royalCrown, { small: 40, medium: 22, large: 9 });

const getBallerina = catalog.get(ballerina);
console.log(getBallerina);

// User Editable Region


catalog.set(getBallerina, { small: 21, medium: 15, large: 12 });

// User Editable Region

console.log(catalog);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

Challenge Information:

Build a Plant Nursery Catalog - Step 11

Hi there!
The best practice is to let us know what error did you get and what you tried to resolve it. With this information it would be much easier to help you.
Thanks.

1 Like

change small property of getBallerina to an integer different from 20

Yes, this is your task in this step

we try to check that the value has changed in the catalog or not , but actually it doesn’t pass

This means that any modifications I make to the object using that reference will directly change the object stored inside the map

do you know how to set the property of an object?
getBallerina is an object, you need to chane a property of it

1 Like

thank you very much , I get it.