I tried using a template literal but my code doesn’t work, does anyone know what’s wrong?
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 79
ILM
2
template literal uses backticks like `
You have used single quotes
Thank you so much!! It still doesn’t work though:
output.innerHTML = `<span class=${surplusOrDeficit.toLowerCase()}></span>`;
Is there anything else you think is wrong?
ILM
4
you need to add quotes around the class name
system
Closed
5
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.