curriculum/challenges/english/blocks/lab-boolean-check/a77dbc43c33f39daa4429b4f.md
In this lab, you will build a function that checks if a value is classified as a boolean primitive.
Boolean primitives are true and false.
Objective: Fulfill the user stories below and get all the tests to pass to complete the lab.
User Stories:
booWho that receives one argument.true.false.You should have a booWho function.
assert.isFunction(booWho);
booWho(true) should return true.
assert.isTrue(booWho(true));
booWho(false) should return true.
assert.isTrue(booWho(false));
booWho([1, 2, 3]) should return false.
assert.isFalse(booWho([1, 2, 3]));
booWho([].slice) should return false.
assert.isFalse(booWho([].slice));
booWho({ "a": 1 }) should return false.
assert.isFalse(booWho({ a: 1 }));
booWho(1) should return false.
assert.isFalse(booWho(1));
booWho(NaN) should return false.
assert.isFalse(booWho(NaN));
booWho("a") should return false.
assert.isFalse(booWho('a'));
booWho("true") should return false.
assert.isFalse(booWho('true'));
booWho("false") should return false.
assert.isFalse(booWho('false'));
function booWho(bool) {
return typeof bool === 'boolean';
}