hi, no help button on this step and using firefox with windows 11 pro. using the jaws for windows screen reader 2025. so up to step 55, did get step 56 to pass, but step 55 is not passing. and have the correct code, is it my code or is it the fcc editor having one of those querks, and have tried multiple times to get this to pass, and also have searched online and got the exact code to the insert adjacent string part of the code and is correct,has two parameters, the ‘‘ string to then be in sink with the html and the html string function which i have defined. so how to get this to work? is this a fcc querk or being very picky. totally blind and cannot see, have reset the lesson multiple times and have done resets and tried with my exact code, please help me out. how to get this to pass, or is this maybe have to test and then report the bug on the github bug tracker,this is so frustrating, maybe straight forward to you, but put your self in my shoes. i cannot see and relying on a screen reader. so, no extra spaces or hidden cahracters i can hear. also tried with the nvda screen reader and windows narrator. would not pass either. so any help? sorry, i am a pest. want to learn, got the other steps step 51, and 52 to pass. please help. totally frustrated and tried to get this to pass for the past hour or two.
marvin.
ps: pasting my code from vs and the error message, no tests runner list, so quincy needs to fix the issues with firefox and also chrome and edge.
const calorieCounter = document.getElementById('calorie-counter');
const budgetNumberInput = document.getElementById('budget');
const entryDropdown = document.getElementById('entry-dropdown');
const addEntryButton = document.getElementById('add-entry');
const clearButton = document.getElementById('clear');
const output = document.getElementById('output');
let isError = false;
function cleanInputString(str) {
console.log("original string: ", str);
const regex = /[+\-\s]/g;
return str.replace(regex, '');
}
function isInvalidInput(str) {
const regex = /\de/;
return str.match(regex);
}
function addEntry() {
const targetInputContainer = document.querySelector(`#${entryDropdown.value} .input-container`);
const entryNumber = targetInputContainer.querySelectorAll('input[type="text"]').length + 1;
const HTMLString = `
<label for="${entryDropdown.value}-${entryNumber}-name">Entry ${entryNumber} Name</label>
<input type="text" placeholder="Name" id="${entryDropdown.value}-${entryNumber}-name" />
<label for="${entryDropdown.value}-${entryNumber}-calories">Entry ${entryNumber} Calories</label>
<input type="number" placeholder="Calories" id="${entryDropdown.value}-${entryNumber}-calories" min="0" />
`;
// ✅ Actually call insertAdjacentHTML here
targetInputContainer.insertAdjacentHTML('beforeend', HTMLString);
}
function getCaloriesFromInputs(list) {
let calories = 0;
for (const item of list) {
const currVal = cleanInputString(item.value);
const invalidInputMatch = isInvalidInput(currVal);
if (invalidInputMatch) {
alert(`Invalid Input: ${invalidInputMatch[0]}`);
isError = true;
return null;
}
// Only add to calories if input is valid
calories += Number(currVal);
}
// Return total calories after the loop
return calories;
}
const calculateCalories = function(e) {
e.preventDefault();
isError = false;
const breakfastNumberInputs = document.querySelectorAll('#breakfast input[type="number"]');
}
addEntryButton.addEventListener("click", addEntry);
You should not pass any arguments to insertAdjacentHTML().
vs code and then looked online i have the xact code.