function booWho(bool) {
// What is the new fad diet for ghost developers? The Boolean.
if( Boolean(bool) === bool){
return true;
}
else{
return false;
}
}
booWho(true);
function booWho(bool) {
// What is the new fad diet for ghost developers? The Boolean.
if( Boolean(bool) === bool){
return true;
}
else{
return false;
}
}
booWho(true);
//another way relatively easier with typeof()
return (typeof(bool) === "boolean")? true: false;