Learn Form Validation by Building a Calorie Counter - Step 47

“${entryDropdown.value}-${entryNumber}-name”

can somebody describe what this expression means in for attribute in label element

Your code so far

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

/* file: styles.css */

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

  <label>Entry ${entryNumber} Name</label>`;

// 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/126.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 47

Do you have more code for HTML & CSS? The code doesn’t seem to relate to each other.

that is a template literal with interpolations. The for attribute must be the same as the id attribute of the input element, and having a value that convoluted for the id/for ensures that the id will be unique for the elements on the page

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.