DEV Community

arpit adlakha
arpit adlakha

Posted on

What will be the output of following javascript code ?

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

circle.perimeter.bind(circle);
console.log(circle.diameter());
console.log(circle.perimeter());

Top comments (0)