Build a Plant Nursery Catalog - Step 10

Tell us what’s happening:

Code will not pass on step 10 of ‘Build a Plant Nursery Catalog’.

I am directly assigning the result of catalog.get(ballerina) to a variable declared using const and the specified name, getBallerina, as instructed. It fails even if I copy the lines from step 11 in the FCC github repo, which leads me to believe there is something wrong with the test runner.

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 });

// User Editable Region
const getBallerina = catalog.get(ballerina);
console.log(getBallerina)
// 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/153.0.0.0 Safari/537.36

Challenge Information:

Build a Plant Nursery Catalog - Step 10

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-plant-nursery-catalog/6734a772196245601e4b80e0.md at main · freeCodeCamp/freeCodeCamp · GitHub

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

Thank you - ultimately what worked was switching from Chrome to Firefox. It still didn’t pass upon the first submission when using Firefox, but when I resubmitted it a second time, it went through. Honestly, I’m not entirely sure what the problem was. For what it’s worth I did try:

  • resetting the code and hard-refreshing the page (as well as just restarting the chrome browser, which is also up-to-date), which did not resolve the problem.
  • Ensuring add-ons/extensions are disabled (none that I have were active on FCC’s website, anyway)
  • attempted to solve it in incognito mode, while signed-out of FCC within the chrome browser (still no success)
  • Ensuring that Chrome’s zoom level was set to 100%

Anyway, I’m past it now, I appreciate the help :+1: