How can i create label inside template literal

Tell us what’s happening: i did like that but sill have an Error.

const HTMLString = Entry ${entryNumber} Name

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

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

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 44

line 23:

Code removed by moderator 

Hey Zeider, i wrote this code const HTMLString =<label>Entry ${entryNumber} Name</label>;
But still have this Message :
Sorry, your code does not pass. You’re getting there.
You should have a label element inside your template literal

solution removed by moderator

1 Like

Thanks Zneider, i got it.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

Sure - makes sense. I will try guide guide instead

1 Like

Your label is inside of the template literal, inside of a constructed variable. Should you have a semicolon inside of this?

Based on my experience, this is now step 46, not 44, and I believe there may be a bug in the checker code. When I submitted the code like this, it passed:

const HTMLString = `
...MY_SOLUTION...
`;

However, when I submitted it like this, it did not pass:

const HTMLString = `...MY_SOLUTION...`;

The only difference is that I added a new line before and after the label element. Please correct me if I’m mistaken or clarify if I misunderstood something.

I’m commenting here because this is the first result that appears when I search for this problem on Google. I hope this helps others, if I’m correct and didn’t misunderstand anything.

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.