--- id: 5ddb965c65d27e1512d44db0 title: Part 25 challengeType: 0 isHidden: true --- ## Description
Use a ternary operator to assign the value of `maxCalories`. A ternary operator has the following syntax: `condition ? expressionTrue : expressionFalse`. For example, `(5 - 3 === 4) ? "Yes" : "No"` does the same thing as the following if else statement: ```js if (5 - 3 === 4) { return 'Yes'; } else { return 'No'; } ``` `document.getElementById('female').checked` will return either `true` if it is checked or `false` if it isn't. Use a ternary operator to return 2000 if it is is checked and 2500 if it is not.
## Instructions
## Tests
```yml tests: - text: See description above for instructions. testString: assert(/const\s*maxCalories\s*=\s*document\.getElementById\([\'\"\`]female[\'\"\`]\)\.checked\s*\?\s*2000\s*\:\s*2500/.test(code)); ```
## Challenge Seed
```html ```
### Before Test
```html

Calorie Counter

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