Files
freecodecamp--freecodecamp/curriculum/challenges/english/blocks/basic-javascript/bd7123c9c441eddfaeb5bdef.md
T
wehub-resource-sync dde272c4b8
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:53 +08:00

54 lines
1.2 KiB
Markdown

---
id: bd7123c9c441eddfaeb5bdef
title: Understanding Boolean Values
challengeType: 1
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`.
# --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--
## --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
}
```