每日3题#1以下代码执行后,控制台中的输出内容为?#varcompany={address:"chengdu",};varobj=Object.create(company);deleteobj.address;console.log(obj.address);2以下代码执行后,控制台中的输出内容为
每日3题#
1 以下代码执行后,控制台中的输出内容为?#
var company = {
address: "chengdu",
};
var obj = Object.create(company);
delete obj.address;
console.log(obj.address);
2 以下代码执行后,控制台中的输出内容为?#
var a = [0];
if (a) {
console.log(a == true);
} else {
console.log(a);
}
3 以下代码执行后,控制台中的输出内容为?#
(function () {
var a = (b = 5);
})();
console.log(b);
console.log(a);
答案及解析#
1#
var company = {
address: "chengdu",
};
var obj = Object.create(company);
delete obj.address;
console.log(obj.address);
2#
var a = [0];
if (a) {
console.log(a == true);
} else {
console.log(a);
}
3#
(function () {
var a = (b = 5);
})();
console.log(b);
console.log(a);