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
What are the pop-up boxes available in javascript?
Explain the role of deferred scripts in javascript?
What is a javascript code?
How to get checkbox status whether it is checked or not?
What is the use of anonymous function in javascript?
What is the use of debugger keyword in javascript?
Why is javascript called richer interface?
What is the difference between registerclientscriptblock and registerstartupscript?
What are global variables in javascript?
Is javascript harmful?
What is built in function in javascript?
What is unobtrusive javascript? How to add behavior to an element using javascript?
What is the method for reading and writing a file in javascript?
What is null in programming?
What is event in javascript?