JavaScript Question 3
Question 3 of 0JavaScript
What's the output?
Code:
const shape = {
radius: 10,
diameter() {
return this.radius * 2;
},
perimeter: () => 2 * Math.PI * this.radius,
};
console.log(shape.diameter());
console.log(shape.perimeter());Select the correct option:
Question discussion
(0)Join the discussion — login to comment and help other developers.
Login to comment