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; | |
} | |
} | |
booWho(null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment