--- id: bd7123c9c441eddfaeb5bdef challengeType: 1 videoUrl: 'https://scrimba.com/c/c9Me8t4' forumTopicId: 301176 title: 理解布尔值 --- ## Description
另一种数据类型是布尔(Boolean)。布尔值要么是true要么是false。它非常像电路开关,true是 “开”,false是 “关”。这两种状态是互斥的。 注意
布尔值是不带引号的,"true""false"字符串而不是布尔值,在 JavaScript 中也没有特殊含义。
## Instructions
修改welcomeToBooleans函数,让它返回true而不是false
## Tests
```yml tests: - text: welcomeToBooleans()函数应该返回一个布尔值 (true/false)。 testString: assert(typeof welcomeToBooleans() === 'boolean'); - text: welcomeToBooleans()应该返回 true。 testString: assert(welcomeToBooleans() === true); ```
## Challenge Seed
```js function welcomeToBooleans() { // Only change code below this line. return false; // Change this line // Only change code above this line. } ```
### After Test
```js welcomeToBooleans(); ```
## Solution
```js function welcomeToBooleans() { return true; // Change this line } ```