Tell us what’s happening:
hi, trying to then add the input type and fcc is not picking that one up.
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function addEntry() {
const targetInputContainer = document.querySelector(`#${entryDropdown.value} .input-container`);
const entryNumber = targetInputContainer.querySelectorAll('input[type="text"]').length;
const HTMLString = `
const HTMLString = `<label for="${entryDropdown.value}-${entryNumber}-name">Entry ${entryNumber} Name</label>
<input type="text" placeholder="Name" id="${entryDropdown.value}-$
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0
Challenge Information:
Build a Calorie Counter - Step 49
https://www.freecodecamp.org/learn/full-stack-developer/workshop-calorie-counter/step-49hi, totally blind. doing step 49 of the calorie counter project. you can look up the step. so, it is not passing, so is it my code? or fcc being very strict and not liking the code? please help me out. trying my best and learning and first time doing this sort of thing, be gentle with me. have reset the lesson, retyped the line of code, did a hard refresh. so help. will paste my js and the error below.
marvin.
ps: pasting below.
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) {
const regex = /[±\s]/g;
return str.replace(regex, ‘’);
}
function isInvalidInput(str) {
const regex = /\d+e\d+/i;
return str.match(regex);
}
function addEntry() {
const targetInputContainer = document.querySelector(#${entryDropdown.value} .input-container);
const entryNumber = targetInputContainer.querySelectorAll(‘input[type=“text”]’).length;
const HTMLString = const HTMLString =Entry ${entryNumber} Name
<input type=“text” placeholder=“Name” id="${entryDropdown.value}-$
}
You should not modify your label element.