--- id: 5ddb965c65d27e1512d44db2 title: Part 27 challengeType: 0 isHidden: true --- ## Description
If `difference` is positive, the total calories the user ate is more than the `maxCalories` recommended, or a calories surplus -- otherwise, if `difference` is negative, the user has a calorie deficit. To determine if this is a calorie surplus or deficit, create a variable named `surplusOrDeficit` to determine if the difference is positive (`difference > 0`). If it is positive, `surplusOrDeficit` should be set equal to the string "Surplus", and "Deficit" if negative. Use the same ternary syntax that you used to determine `maxCalories`.
## Instructions
## Tests
```yml tests: - text: See description above for instructions. testString: assert(/const\s*surplusOrDeficit\s*\=\s*difference\s*\>\s*0\s*\?\s*[\'\"\`]Surplus[\'\"\`]\s*\:\s*[\'\"\`]Deficit[\'\"\`]/.test(code)); ```
## Challenge Seed
```html ```
### Before Test
```html

Calorie Counter

Sex
Breakfast
Lunch
Dinner
```
### After Test
```html ```
## Solution
```html ```