输入检查算法挑战
方法一
function boo(bool) {
if (bool === true || bool ===false){
return true;
}
// What is the new fad diet for ghost developers? The Boolean.
return false;
}
boo(null);
方法二:
function boo(bool) {
// What is the new fad diet for ghost developers? The Boolean.
return typeof bool === 'boolean';
}
boo(null);