Learn Form Validation by Building a Calorie Counter - Step 79

Tell us what’s happening:

Code is not passing with double or single quotes for the class attribute. Why is this not passing?

Instructions:

Step 79

Your output.innerHTML string will need a span element. Create that, and give it a class attribute set to the surplusOrDeficit variable, but lowercased.

Strings have a .toLowerCase() method that can help you with this. Do not give your span any text yet.

Your code so far

output.innerHTML = <span class="surplusOrDeficit.toLowerCase()"></span>;

1 Like

Hi Nick!

Don’t forget that in template literals we call variables with:
${variable name here}

3 Likes

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