JavaScript typeof()

typeof()这个函数是干什么用的?有几个参数,每个参数代表什么?

蝴蝶不菲
浏览 524回答 3
3回答

月关宝盒

写了代码测试了下<script>document.write ("typeof(1): "+typeof(1)+"<br>");document.write ("typeof(NaN): "+typeof(NaN)+"<br>");document.write ("typeof(Number.MIN_VALUE): "+typeof(Number.MIN_VALUE)+"<br>")document.write ("typeof(Infinity): "+typeof(Infinity)+"<br>")document.write ("typeof(\"123\"): "+typeof("123")+"<br>")document.write ("typeof(true): "+typeof(true)+"<br>")document.write ("typeof(window): "+typeof(window)+"<br>")document.write ("typeof(document): "+typeof(document)+"<br>")document.write ("typeof(null): "+typeof(null)+"<br>")
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript