--- id: a77dbc43c33f39daa4429b4f title: Boo who isRequired: true challengeType: 5 --- ## Description
Check if a value is classified as a boolean primitive. Return true or false. Boolean primitives are true and false. Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code.
## Instructions
## Tests
```yml tests: - text: booWho(true) should return true. testString: assert.strictEqual(booWho(true), true, 'booWho(true) should return true.'); - text: booWho(false) should return true. testString: assert.strictEqual(booWho(false), true, 'booWho(false) should return true.'); - text: booWho([1, 2, 3]) should return false. testString: assert.strictEqual(booWho([1, 2, 3]), false, 'booWho([1, 2, 3]) should return false.'); - text: booWho([].slice) should return false. testString: assert.strictEqual(booWho([].slice), false, 'booWho([].slice) should return false.'); - text: 'booWho({ "a": 1 }) should return false.' testString: 'assert.strictEqual(booWho({ "a": 1 }), false, ''booWho({ "a": 1 }) should return false.'');' - text: booWho(1) should return false. testString: assert.strictEqual(booWho(1), false, 'booWho(1) should return false.'); - text: booWho(NaN) should return false. testString: assert.strictEqual(booWho(NaN), false, 'booWho(NaN) should return false.'); - text: booWho("a") should return false. testString: assert.strictEqual(booWho("a"), false, 'booWho("a") should return false.'); - text: booWho("true") should return false. testString: assert.strictEqual(booWho("true"), false, 'booWho("true") should return false.'); - text: booWho("false") should return false. testString: assert.strictEqual(booWho("false"), false, 'booWho("false") should return false.'); ```
## Challenge Seed
```js function booWho(bool) { // What is the new fad diet for ghost developers? The Boolean. return bool; } booWho(null); ```
## Solution
```js function booWho(bool) { return typeof bool === "boolean"; } booWho(null); ```