null 没有对象的意思
undefind 原声数据没有
dom所声明的全部为null 例如
标签
对象声明用 :
调用 .
数组调用[]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>新建网页</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="description" content="布尔教育 http://www.itbool.com" /> </head> <body> <script> var a = 23; var b = 3.14; var c = 'hello'; var d = 'world'; var e = true; var f = null; var g = undefined; var h = {name:'lisi' , age: 29};//对象类型 console.log(h.name); //lisi console.log(h['name']); //lisi var arr = ['a' , 3 , 'hello' , true]; //始终从0,1.....n 递增不会空缺 console.log(arr); //["a", 3, "hello", true] console.log(arr[3]); // true 0 1 2 3 </script> </body> </html>

我的微信
这是我的微信扫一扫