选择篇(015)-下面代码的输出是什么?
文章目录
const shape = {
radius: 10,
diameter() {
return this.radius * 2
},
perimeter: () => 2 * Math.PI * this.radius
}
shape.diameter()
shape.perimeter()A: 20 and 62.83185307179586
B: 20 and NaN
C: 20 and 63
D: NaN and 63
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论