* 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.3 KiB
1.3 KiB
id, title, challengeType, forumTopicId, dashedName
id | title | challengeType | forumTopicId | dashedName |
---|---|---|---|---|
a77dbc43c33f39daa4429b4f | Boo who | 5 | 16000 | boo-who |
--description--
Check if a value is classified as a boolean primitive. Return true or false.
Boolean primitives are true and false.
--hints--
booWho(true)
should return true.
assert.strictEqual(booWho(true), true);
booWho(false)
should return true.
assert.strictEqual(booWho(false), true);
booWho([1, 2, 3])
should return false.
assert.strictEqual(booWho([1, 2, 3]), false);
booWho([].slice)
should return false.
assert.strictEqual(booWho([].slice), false);
booWho({ "a": 1 })
should return false.
assert.strictEqual(booWho({ a: 1 }), false);
booWho(1)
should return false.
assert.strictEqual(booWho(1), false);
booWho(NaN)
should return false.
assert.strictEqual(booWho(NaN), false);
booWho("a")
should return false.
assert.strictEqual(booWho('a'), false);
booWho("true")
should return false.
assert.strictEqual(booWho('true'), false);
booWho("false")
should return false.
assert.strictEqual(booWho('false'), false);
--seed--
--seed-contents--
function booWho(bool) {
return bool;
}
booWho(null);
--solutions--
function booWho(bool) {
return typeof bool === "boolean";
}
booWho(null);