Files
freeCodeCamp/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.md
Kelvin Sánchez fad168b465 fix(learn): fix some code tags, capitalization and punctuation in challenge (#41161)
* fix some code tags, capitalization and punctuation

Note: The reserved word in JavaScript is "boolean", so I think it is appropriate to use it like this inside the code tags.

* Remove code tags and capitalize first letter

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

* capitalize letter and replace slash

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
2021-02-18 08:45:12 -07:00

63 lines
1.3 KiB
Markdown

---
id: bd7123c9c441eddfaeb5bdef
title: Understanding Boolean Values
challengeType: 1
videoUrl: 'https://scrimba.com/c/c9Me8t4'
forumTopicId: 301176
dashedName: understanding-boolean-values
---
# --description--
Another data type is the <dfn>Boolean</dfn>. Booleans may only be one of two values: `true` or `false`. They are basically little on-off switches, where `true` is "on" and `false` is "off". These two states are mutually exclusive.
**Note**
Boolean values are never written with quotes. The strings `"true"` and `"false"` are not Boolean and have no special meaning in JavaScript.
# --instructions--
Modify the `welcomeToBooleans` function so that it returns `true` instead of `false` when the run button is clicked.
# --hints--
The `welcomeToBooleans()` function should return a Boolean (`true` or `false`) value.
```js
assert(typeof welcomeToBooleans() === 'boolean');
```
`welcomeToBooleans()` should return `true`.
```js
assert(welcomeToBooleans() === true);
```
# --seed--
## --after-user-code--
```js
welcomeToBooleans();
```
## --seed-contents--
```js
function welcomeToBooleans() {
// Only change code below this line
return false; // Change this line
// Only change code above this line
}
```
# --solutions--
```js
function welcomeToBooleans() {
return true; // Change this line
}
```