共计 258 个字符,预计需要花费 1 分钟才能阅读完成。
class Chameleon {static colorChange(newColor) {
this.newColor = newColor
return this.newColor
}
constructor({newColor = 'green'} = {}) {this.newColor = newColor}
}
const freddie = new Chameleon({newColor: 'purple'})
freddie.colorChange('orange')
A: orange
B: purple
C: green
D: TypeError
参考答案:
正文完
发表至: javascript
2022-01-19