Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

What is the orientation toward time?

Answered: 1 week ago

Question

The Goals of Informative Speaking Topics for Informative

Answered: 1 week ago