代码如下:
输出三种方式的结果
document.write("
obj的类型:"+typeof obj);//object
document.write("
ooo的类型:"+typeof ooo);//object
document.write("
oooo的类型:"+typeof oooo);//object
/**
数组 也是一种对象
*/
var $array = [];
var $arrayA = ["aaa","bbb",111,false];
var $arrayB = new Array();
document.write("
$array的数据类型:"+typeof $array);//object
document.write("
$arrayA的数据类型:"+typeof $arrayA);//object
document.write("
$arrayB的数据类型:"+typeof $arrayB);//object
script>