Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 6 (1 point) var protoCircle ={ radius: 1 , area: function () {return Math.PI * this.radius * this.radius;}, circumference: function () {return 2 Math.PI
Question 6 (1 point) var protoCircle ={ radius: 1 , area: function () \{return Math.PI * this.radius * this.radius;\}, circumference: function () \{return 2 Math.PI * this.radius; \}; / Creates a circle with a given radius. */ var Circle = function (r){ varc= Object.create(protoCircle); c.radius =r; return c; \}; Assume that we write: varc= new Circle(0); varc1 = new Circle(2); var c2 = new Circle(10); console. log( c.area()+c1.area()+c2.area()); console.log(c.circumference()+ c1.circumference()+c2.circumference()); 329.8672286269283 81.68140899333463 326.7256359733385 81.68140899333463 329.8672286269283 75.38922368615503 326.7256359733385 75.38922368615503
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started