How do you extend classes
Code snippet:
const circle = {
radius: 20,
diameter() {
return this.radius * 2;
},
perimeter: () => 2 * Math.PI * this.radius
};
Post New Answer View All Answers
Which is the best website to learn javascript?
Can you assign an anonymous function to a variable?
What are the seven data types of javascript?
How to remove duplicates from javascript array?
What does a typeof operator do?
How many types of javascript are there?
What coding language should I learn first?
Can we learn javascript without knowing java?
What is a callback url?
Is it possible to do 301 redirects in javascript ?
Explain the for-in loop?
How can we detect os of the client machine using javascript?
Are namespaces are there in javascript?
Why is javascript so popular?
Explain javascript accessors ?