版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/AC_greener/article/details/82313170
题目:
检查一个值是否是基本布尔类型,并返回 true 或 false。
基本布尔类型即 true 和 false。
function boo(bool) {
// What is the new fad diet for ghost developers? The Boolean.
if(bool === true || bool === false) {
return true;
}
return false;
}
boo(null);