比较操作符

2017-06-15 10:55:00
admin
原创
326
<!DOCTYPE html>
<html>
	<head>
		<title>
			Relational Operators Example 1
		</title>
		<script type="text/javascript">
			var result1 = 5 > 3; //true
			var result2 = 5 < 3; //false
			var result3 = "Brick" < "alphabet"; //true
			var result4 = "Brick".toLowerCase() < "alphabet".toLowerCase(); //false
			var result5 = "23" < "3"; //true
			var result6 = "23" < 3; //false
			var result7 = "a" < 3; //false because "a" becomes NaN
			var result8 = NaN < 3; //false
			var result9 = NaN >= 3; //false
			alert(result1);
			alert(result2);
			alert(result3);
			alert(result4);
			alert(result5);
			alert(result6);
			alert(result7);
			alert(result8);
			alert(result9);
		</script>
	</head>
	<body>
	</body>
</html>
文章分类
联系我们
电话: 18902328227
Email: 2689701946@qq.com
QQ: 2689701946
微信: 18902328227
地址: 广州番禺区繁华路
  • 在线客服
  • 关注微信
  • 联系电话
    • 欢迎咨询
    • 欢迎加入QQ群 303257430
  • 公众号:源宝网络
    • 联系电话及微信号 18902328227