Description
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