2018-10-10 18:03:03 -04:00
---
id: bd7123c9c441eddfaeb5bdef
2021-02-06 04:42:36 +00:00
title: Understanding Boolean Values
2018-10-10 18:03:03 -04:00
challengeType: 1
2020-04-29 18:29:13 +08:00
videoUrl: 'https://scrimba.com/c/c9Me8t4'
forumTopicId: 301176
2021-01-13 03:31:00 +01:00
dashedName: understanding-boolean-values
2018-10-10 18:03:03 -04:00
---
2020-12-16 00:37:30 -07:00
# --description--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
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.
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
**Note**
`Boolean` values are never written with quotes. The `strings` `"true"` and `"false"` are not `Boolean` and have no special meaning in JavaScript.
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
# --instructions--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
Modify the `welcomeToBooleans` function so that it returns `true` instead of `false` when the run button is clicked.
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
# --hints--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
The `welcomeToBooleans()` function should return a boolean (true/false) value.
2018-10-10 18:03:03 -04:00
```js
2020-12-16 00:37:30 -07:00
assert(typeof welcomeToBooleans() === 'boolean');
2018-10-10 18:03:03 -04:00
```
2021-02-06 04:42:36 +00:00
`welcomeToBooleans()` should return true.
2018-10-10 18:03:03 -04:00
```js
2020-12-16 00:37:30 -07:00
assert(welcomeToBooleans() === true);
2018-10-10 18:03:03 -04:00
```
2021-01-13 03:31:00 +01:00
# --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
}
```
2020-12-16 00:37:30 -07:00
# --solutions--
2020-04-29 18:29:13 +08:00
2021-01-13 03:31:00 +01:00
```js
function welcomeToBooleans() {
return true; // Change this line
}
```