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



How do you extend classes Code snippet: const circle = { radius: 20, diameter() { retur..

Answer / hrpatelsoft@gmail.com

40 and NaN

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

Are you concerned that older browsers don't support javascript and thus exclude a set of web users? Individual users?

0 Answers  


What is difference between arrow function and normal function?

0 Answers  


How to have an element invoke a javascript on selection, instead of going to a new url?

0 Answers  


What does "1"+2+4 evaluate to?

10 Answers   Acheron, Satyam,


What is a “closure” in JavaScript? Provide an example

1 Answers  






What is the difference between HTMLCollection and NodeList?

0 Answers  


How do you check if a string is a number javascript?

0 Answers  


How to find operating system in the client machine using javascript?

0 Answers  


What is the importance of javascript?

0 Answers  


How to create array in JavaScript?

0 Answers  


How to access an external javascript file that is stored externally and not embedded?

0 Answers  


How to add html elements dynamically with JavaScript?

0 Answers  


Categories