前提:对象通过点取值并赋值
猜测结果:
A.正常运行
B.SyntaxError. 你不能通过这种方式给函数增加属性
C.undefined
D.ReferenceError
代码源码:
function back(params) {
console.log('Woof!');
}
back.animal = 'dog'
结果展示:
成果分析:
疑惑:
不知道最终的结果应该选ABCD中哪一个
前提:对象通过点取值并赋值
猜测结果:
A.正常运行
B.SyntaxError. 你不能通过这种方式给函数增加属性
C.undefined
D.ReferenceError
代码源码:
function back(params) {
console.log('Woof!');
}
back.animal = 'dog'
结果展示:
成果分析:
疑惑:
不知道最终的结果应该选ABCD中哪一个