freeCodeCamp/guide/english/certifications/javascript-algorithms-and-d.../basic-javascript/understanding-boolean-values/index.md

37 lines
992 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Understanding Boolean values
---
## Understanding Boolean values
### Problem explanation:
Modify the `welcomeToBooleans` function so that it returns `true` instead of `false` when the run button is clicked.
### Hint 1
You just need to edit line 5 so the function returns `true` instead of `false`.
> _try to solve the problem now_
## Spoiler Alert!
**Solution ahead!**
## ![:beginner:](https://forum.freecodecamp.com/images/emoji/emoji_one/beginner.png?v=3 ":beginner:") Basic code solution:
```javascript
function welcomeToBooleans() {
// Only change code below this line.
return true; // Change this line
// Only change code above this line.
}
```
### Code explanation
Just modifying the `Boolean` value you wan't the function to return from `false` to `true` will meet the requirements.
### Resources
[MDN glossary - Boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)
[Wikipedia - Boolean data type](https://en.wikipedia.org/wiki/Boolean_data_type)