--- id: 5ddb965c65d27e1512d44db2 title: Step 27 challengeType: 0 dashedName: step-27 --- # --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`. # --hints-- See description above for instructions. ```js assert( /const\s*surplusOrDeficit\s*\=\s*difference\s*\>\s*0\s*\?\s*[\'\"\`]Surplus[\'\"\`]\s*\:\s*[\'\"\`]Deficit[\'\"\`]/.test( code ) ); ``` # --seed-- ## --before-user-code-- ```html

Calorie Counter

Sex
Breakfast
Lunch
Dinner
``` ## --after-user-code-- ```html ``` ## --seed-contents-- ```html ``` # --solutions-- ```html ```