2018-09-30 23:01:58 +01:00
---
id: bd7123c9c441eddfaeb5bdef
title: Understanding Boolean Values
challengeType: 1
2019-02-14 12:24:02 -05:00
videoUrl: 'https://scrimba.com/c/c9Me8t4'
2019-08-05 09:17:33 -07:00
forumTopicId: 301176
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01: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-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01: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-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --instructions--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
Modify the `welcomeToBooleans` function so that it returns `true` instead of `false` when the run button is clicked.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --hints--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
The `welcomeToBooleans()` function should return a boolean (true/false) value.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
assert(typeof welcomeToBooleans() === 'boolean');
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
`welcomeToBooleans()` should return true.
```js
assert(welcomeToBooleans() === true);
```
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --after-user-code--
2018-09-30 23:01:58 +01:00
```js
2018-10-20 21:02:47 +03:00
welcomeToBooleans();
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
function welcomeToBooleans() {
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
// Only change code below this line
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
return false; // Change this line
// Only change code above this line
}
```
# --solutions--
2018-09-30 23:01:58 +01:00
```js
function welcomeToBooleans() {
return true; // Change this line
}
```