Learn Form Validation by Building a Calorie Counter - Step 79

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

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?

you need to add quotes around the class name

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