关于前端:选择篇015下面代码的输出是什么

3次阅读

共计 181 个字符,预计需要花费 1 分钟才能阅读完成。

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

参考答案:

正文完
 0