1.8 KiB
1.8 KiB
id, title, challengeType, videoUrl, localeTitle
| id | title | challengeType | videoUrl | localeTitle |
|---|---|---|---|---|
| bd7123c9c441eddfaeb5bdef | Understanding Boolean Values | 1 | 了解布尔值 |
Description
Booleans可能只是两个值中的一个: true或false 。它们基本上是很少的开关,其中true为“on”而false为“off”。这两个国家是相互排斥的。 注意 Boolean值永远不会用引号写。 strings "true"和"false"不是Boolean ,在JavaScript中没有特殊含义。 Instructions
welcomeToBooleans函数,以便在单击运行按钮时返回true而不是false 。 Tests
tests:
- text: <code>welcomeToBooleans()</code>函数应该返回一个布尔值(true / false)。
testString: 'assert(typeof welcomeToBooleans() === "boolean", "The <code>welcomeToBooleans()</code> function should return a boolean (true/false) value.");'
- text: <code>welcomeToBooleans()</code>应该返回true。
testString: 'assert(welcomeToBooleans() === true, "<code>welcomeToBooleans()</code> should return true.");'
Challenge Seed
function welcomeToBooleans() {
// Only change code below this line.
return false; // Change this line
// Only change code above this line.
}
After Test
console.info('after the test');
Solution
// solution required