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