Skip to content

step 9 of workshop-recipe-ingredient-converter missing an instruction to create a variable #61339

Closed
@hbar1st

Description

@hbar1st

Describe the Issue

I noticed that step 10 of the Recipe Ingredient Converter workshop shows us seed code that includes a variable called conversionRate (declared inside the convertQuantity function).
However we didn't create this variable in any earlier step. I think step 9 should be modified to ask for this conversionRate variable to be created or the seed code for step 10 should be modified to not include it.

for eg. the function could be:

const convertQuantity = (fromUnit) => (toUnit) => (quantity) => {
  return conversionTable[fromUnit][toUnit] * quantity;
}

(I believe that would match what we were asked to do in step 9 better)
versus

Step 10's current seed code convertQuantity function:

const convertQuantity = (fromUnit) => (toUnit) => (quantity) => {
  const conversionRate = conversionTable[fromUnit][toUnit];
  return quantity * conversionRate;
}

Affected Page

https://www.freecodecamp.org/learn/full-stack-developer/workshop-recipe-ingredient-converter/step-9

Your code

N/A

Expected behavior

step 10 surprises us with a variable that we didn't create in any prior step. We should either ask the learner to create that variable in step 9 or update step 10 to not include that variable.

Screenshots

No response

System

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.status: waiting triageThis issue needs help from moderators and users to reproduce and confirm its validity and fix.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions