结果和课程里面讲的不一样
var obj6 = {x:1};
obj6.y = 2;
if(obj6.y){
obj6.y.z = 3;
var yz = obj6.y.z;
document.write(yz+"</br>");
}
结果是undefined,不是应该是3吗?
var obj6 = {x:1};
obj6.y = 2;
if(obj6.y){
obj6.y.z = 3;
var yz = obj6.y.z;
document.write(yz+"</br>");
}
结果是undefined,不是应该是3吗?
2016-12-23
举报