Question from the Javascript test

Write a function that calculates the perimeter of a circle.

Expert

What's the exit?

const shape = {
  radius: 10,
  diameter() {
    return this.radius * 2;
  },
  perimeter: () => 2 * Math.PI * this.radius
};

shape.diameter();
shape.perimeter();
Author: Vincent CotroStatus: PublishedQuestion passed 262 times
Edit
2
Community EvaluationsNo one has reviewed this question yet, be the first!