js变量比较大全
摘要:你想不到的结果,很有意思的js考试题目
js代码
<script type="text/javascript"> <!-- alert("typeof(NaN)结果:"+typeof(NaN)); alert("typeof(Infinity)结果:"+typeof(Infinity)); alert("typeof(null)结果:"+typeof(null)); alert("typeof(undefined)结果:"+typeof(undefined)); alert("NaN==NaN结果:"+(NaN==NaN)); alert("NaN!=NaN结果:"+(NaN!=NaN)); alert("NaN>NaN结果:"+(NaN>NaN)); alert("null==undefined结果:"+(null==undefined)); alert("null>=undefined结果:"+(null>=undefined)); alert("null<=undefined结果:"+(null<=undefined)); alert("null==null结果:"+(null==null)); alert("null!=null结果:"+(null!=null)); alert("null!=NaN结果:"+(null!=NaN)); alert("null==NaN结果:"+(null==NaN)); alert("NaN==undefined结果:"+(NaN==undefined)); alert('parseInt("123abc")结果:'+parseInt("123abc")); alert('"123abc"-0结果:'+("123abc"-0)); alert("Infinity>10结果:"+(Infinity>10)); alert('Infinity>"abc"结果:'+(Infinity>"abc")); alert("Infinity==NaN结果:"+(Infinity==NaN)); alert("true==1结果:"+(true==1)); alert('new String("abc")=="abc"结果:'+(new String("abc")=="abc")); alert('new String("abc")==="abc"结果:'+(new String("abc")==="abc")); //--> </script>
相关文章
最新发布
阅读排行
热门文章
猜你喜欢