How do you extend classes
Code snippet:
const circle = {
radius: 20,
diameter() {
return this.radius * 2;
},
perimeter: () => 2 * Math.PI * this.radius
};

Answer Posted / hrpatelsoft@gmail.com

40 and NaN

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the variables in javascript?

555


Why would you use a sticky session?

508


What is camelcase in programming?

432


What would you use javascript for?

483


How do I use an external javascript file?

498






What are the scopes of a variable in javascript?

514


How to write a script for "select" lists using javascript

501


What is singleton class in javascript? Explain

472


Are java and javascript same?

489


To put a "close window" link on a page ?

532


What is memory leak in javascript?

465


Is Exception handling possible in Javascript?

539


What is the use of a weakmap object in javascript?

468


What is the use of anonymous function in javascript?

460


just for testing

1743