Learn Form Validation by Building a Calorie Counter - Step 39

Tell us what’s happening:

You should use concatenation to add entryDropdown.value after your # string.

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function addEntry() {

  const targetId = "#" + "entryDropdowm.value";
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 39

This will be treated as a string.

You are accessing the value of entryDropDown variable, get rid of the quotes.

In addition, you have a typo here.

i did but still got the same issuse

:grinning: thank you heheheheh
happy coding

1 Like