* chore(i18n,curriculum): update translations * chore: Italian to italian Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
1.5 KiB
1.5 KiB
id, title, challengeType, forumTopicId, dashedName
| id | title | challengeType | forumTopicId | dashedName |
|---|---|---|---|---|
| a77dbc43c33f39daa4429b4f | Boo who | 5 | 16000 | boo-who |
--description--
Controllare se un valore è un classificato come primitivo booleano. Restituisce true o false.
I primitivi booleani sono true e false.
--hints--
booWho(true) dovrebbe restituire true.
assert.strictEqual(booWho(true), true);
booWho(false) dovrebbe restituire true.
assert.strictEqual(booWho(false), true);
booWho([1, 2, 3]) dovrebbe restituire false.
assert.strictEqual(booWho([1, 2, 3]), false);
booWho([].slice) dovrebbe restituire false.
assert.strictEqual(booWho([].slice), false);
booWho({ "a": 1 }) dovrebbe restituire false.
assert.strictEqual(booWho({ a: 1 }), false);
booWho(1) dovrebbe restituire false.
assert.strictEqual(booWho(1), false);
booWho(NaN) dovrebbe restituire false.
assert.strictEqual(booWho(NaN), false);
booWho("a") dovrebbe restituire false.
assert.strictEqual(booWho('a'), false);
booWho("true") dovrebbe restituire false.
assert.strictEqual(booWho('true'), false);
booWho("false") dovrebbe restituire 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);