# Learn Form Validation by Building a Calorie Counter - Step 79

**URL:** <https://forum.freecodecamp.org/t/learn-form-validation-by-building-a-calorie-counter-step-79/675229>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [February 26, 2024, 2:30pm UTC](https://forum.freecodecamp.org/t/learn-form-validation-by-building-a-calorie-counter-step-79/675229 "2024-02-26T14:30:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chatambudzajessica29](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/chatambudzajessica29/32/351300_2.png) [@chatambudzajessica29](https://forum.freecodecamp.org/u/chatambudzajessica29)\
**Post date:** [February 26, 2024, 2:30pm UTC](https://forum.freecodecamp.org/t/learn-form-validation-by-building-a-calorie-counter-step-79/675229/1 "2024-02-26T14:30:16Z")

</div>

### Tell us what’s happening:

i dont understand what i have done wrong here. i put the span element in the template literal but it says code does not pass still. please assist

### Your code so far

```auto

const surplusOrDeficit = remainingCalories < 0 ? 'Surplus' : 'Deficit';
  output.innerHTML = `<span class="${surplusOrDeficit.lowerCase()}"></span>`;

```

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.

````plaintext
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 79

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-form-validation-by-building-a-calorie-counter/step-79)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![DanielHuebschmann](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/danielhuebschmann/32/415871_2.png) [@DanielHuebschmann](https://forum.freecodecamp.org/u/DanielHuebschmann)\
**Post date:** [February 26, 2024, 2:41pm UTC](https://forum.freecodecamp.org/t/learn-form-validation-by-building-a-calorie-counter-step-79/675229/2 "2024-02-26T14:41:42Z")

</div>

Hello!

Just a little syntax error: `toLowerCase( )` .

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [August 27, 2024, 2:42am UTC](https://forum.freecodecamp.org/t/learn-form-validation-by-building-a-calorie-counter-step-79/675229/3 "2024-08-27T02:42:29Z")

</div>

Closed on August 27, 2024, 2:42am UTC

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