(01)javascript 数据类型

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript">
        function f() {

        }
        var s = "";
        s+="typeof true:			"+typeof true+"
"
        s+="typeof 3.3:				"+typeof 3+"
"
        s+="typeof 'hello':			"+typeof 'hello'+"
"
        s+="typeof f :				"+typeof f+"
";
        s+="typeof new Array(1,2,):	"+typeof new Array(1,2)+"
"
        s+="typeof [1,3]:			"+typeof [1,3]+"
"
        s+="typeof null:			"+typeof null+"
"
        s+="typeof undefined:		"+typeof undefined+"
"
        console.log(s)

        /*结果如下:
        typeof true:            boolean
        typeof 3.3:             number
        typeof 'hello':         string
        typeof f :              function
        typeof new Array(1,2,): object
        typeof [1,3]:           object
        typeof null:            object
        typeof undefined:       undefined*/
    </script>
</head>
<body>

</body>
</html>
原文地址:https://www.cnblogs.com/yldf/p/11900160.html