JS basis _Boolean

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			
			/*
			 * Boolean 布尔值
			 * 	布尔值只有两个,主要用来做逻辑判断
			 * 	true
			 * 		- 表示真
			 * 	false
			 * 		- 表示假
			 * 
			 * 使用typeof检查一个布尔值时,会返回boolean
			 */
			
			var bool = false;
			
			console.log(typeof bool);//boolean
			console.log(bool);       //false
			
			
		</script>
	</head>
	<body>
	</body>
</html>

 

Published 926 original articles · won praise 105 · views 760 000 +

Guess you like

Origin blog.csdn.net/ZHOU_VIP/article/details/105000408