* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
1.2 KiB
1.2 KiB
id, title, challengeType, videoUrl, forumTopicId, dashedName
id | title | challengeType | videoUrl | forumTopicId | dashedName |
---|---|---|---|---|---|
bd7123c9c441eddfaeb5bdef | 理解布尔值 | 1 | https://scrimba.com/c/c9Me8t4 | 301176 | understanding-boolean-values |
--description--
另一种数据类型是布尔(Boolean)。布尔
值要么是true
要么是false
。它非常像电路开关,true
是 “开”,false
是 “关”。这两种状态是互斥的。
注意
布尔值
是不带引号的,"true"
和"false"
是字符串
而不是布尔值
,在 JavaScript 中也没有特殊含义。
--instructions--
修改welcomeToBooleans
函数,让它返回true
而不是false
。
--hints--
welcomeToBooleans()
函数应该返回一个布尔值 (true/false)。
assert(typeof welcomeToBooleans() === 'boolean');
welcomeToBooleans()
应该返回 true。
assert(welcomeToBooleans() === true);
--seed--
--after-user-code--
welcomeToBooleans();
--seed-contents--
function welcomeToBooleans() {
// Only change code below this line
return false; // Change this line
// Only change code above this line
}
--solutions--
function welcomeToBooleans() {
return true; // Change this line
}