2018-10-12 15:37:13 -04:00
|
|
|
---
|
|
|
|
title: Understanding Boolean values
|
|
|
|
---
|
2019-07-24 00:59:27 -07:00
|
|
|
# Understanding Boolean values
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
|
|
|
|
---
|
|
|
|
## Hints
|
2018-10-12 15:37:13 -04:00
|
|
|
|
|
|
|
### Hint 1
|
|
|
|
You just need to edit line 5 so the function returns `true` instead of `false`.
|
|
|
|
|
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
---
|
|
|
|
## Solutions
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
<details><summary>Solution 1 (Click to Show/Hide)</summary>
|
2018-10-12 15:37:13 -04:00
|
|
|
|
|
|
|
```javascript
|
|
|
|
function welcomeToBooleans() {
|
2019-07-24 00:59:27 -07:00
|
|
|
// Only change code below this line.
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
return true; // Change this line
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
// Only change code above this line.
|
2018-10-12 15:37:13 -04:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
#### Code Explanation
|
2018-10-12 15:37:13 -04:00
|
|
|
Just modifying the `Boolean` value you wan't the function to return from `false` to `true` will meet the requirements.
|
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
#### Relevant Links
|
|
|
|
* [MDN glossary - Boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)
|
|
|
|
* [Wikipedia - Boolean data type](https://en.wikipedia.org/wiki/Boolean_data_type)
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
</details>
|