javaScript有哪些数据类型

基本数据类型:

        字符串: String

        数字:     Number

        布尔值: Boolean

        未定义: Undefined

        空:        Null

引用数据类型:

        对象: object

        函数: fuction

可以通过typeof操作符来返回数据类型:

var message = "some string"
console.log(typeof message);     //string
console.log(typeof (message));  //string
console.log(typeof 95);         //number

 

posted @ 2017-10-31 14:38  不乱来的嫖客  阅读(116)  评论(0编辑  收藏  举报