js关键字

来源:互联网 发布:搜图的软件 编辑:程序博客网 时间:2024/05/21 04:24
JS中的关键字都有
break delete function return typeof case do if switch var catch else in this void continue false instanceof throw while debugger finally new true with default for null try 
新问题 :对象中的属性中能不能有对象类型
答案是可以的,接下来我为大家做一个案例
<script>      var plane = {name:"螺旋机",        type:"国产Z98",        color:"黑色",        product_day:new Date(),        scrap:false,    driving_years:5}    alert(typeof (plane.name));</script>

生产日期是它的一个属性,
New date()是生产日期的一个属性
所以说是可以在对象属性中添加属性