diff --git a/curriculum/challenges/english/blocks/learn-form-validation-by-building-a-calorie-counter/63c2194dce265f429300c8b1.md b/curriculum/challenges/english/blocks/learn-form-validation-by-building-a-calorie-counter/63c2194dce265f429300c8b1.md index ac720392c3b..f9c6a9683c8 100644 --- a/curriculum/challenges/english/blocks/learn-form-validation-by-building-a-calorie-counter/63c2194dce265f429300c8b1.md +++ b/curriculum/challenges/english/blocks/learn-form-validation-by-building-a-calorie-counter/63c2194dce265f429300c8b1.md @@ -7,7 +7,7 @@ dashedName: step-54 # --description-- -Try adding a couple of entries to the `Breakfast` category, and you may notice some bugs! The first thing we need to fix is the entry counts – the first entry should have a count of `1`, not `0`. +Try adding a couple of entries to the `Breakfast` category, and you may notice some bugs! The first thing you need to fix is the entry counts – the first entry should have a count of `1`, not `0`. This bug occurs because you are querying for `input[type="text"]` elements *before* adding the new entry to the page. To fix this, update your `entryNumber` variable to be the value of the `length` of the query plus `1`. Add this on your declaration line, not in your template strings. diff --git a/curriculum/challenges/english/blocks/workshop-calorie-counter/63c2194dce265f429300c8b1.md b/curriculum/challenges/english/blocks/workshop-calorie-counter/63c2194dce265f429300c8b1.md index ac720392c3b..f9c6a9683c8 100644 --- a/curriculum/challenges/english/blocks/workshop-calorie-counter/63c2194dce265f429300c8b1.md +++ b/curriculum/challenges/english/blocks/workshop-calorie-counter/63c2194dce265f429300c8b1.md @@ -7,7 +7,7 @@ dashedName: step-54 # --description-- -Try adding a couple of entries to the `Breakfast` category, and you may notice some bugs! The first thing we need to fix is the entry counts – the first entry should have a count of `1`, not `0`. +Try adding a couple of entries to the `Breakfast` category, and you may notice some bugs! The first thing you need to fix is the entry counts – the first entry should have a count of `1`, not `0`. This bug occurs because you are querying for `input[type="text"]` elements *before* adding the new entry to the page. To fix this, update your `entryNumber` variable to be the value of the `length` of the query plus `1`. Add this on your declaration line, not in your template strings.