Skip to content

Instantly share code, notes, and snippets.

@cyborg595
cyborg595 / boo-who.js
Created July 4, 2021 04:38 — forked from nickihastings/boo-who.js
Check if a value is classified as a boolean primitive. Return true or false. Boolean primitives are true and false.
function booWho(bool) {
// What is the new fad diet for ghost developers? The Boolean.
//check if the value 'bool' is strictly true or false, this means the value is a Boolean Primitive and should return true.
//Everything else should return false.
if(bool === true || bool === false){
return true;
}
else {
return false;
}