function bark() {
  console.log('Woof!')
}

bark.animal = 'dog'

A: 正常运行!
B: SyntaxError. 你不能通过这种方式给函数增加属性。
C: undefined
D: ReferenceError

参考答案:


齐德龙
28 声望5 粉丝

专注于前端技术的学习与分享!