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
Do I need var in javascript?
What is the use of spread operator?
What is the use of document object?
what is a dataset
How to define a anonymous function?
Why global variables are bad javascript?
What is array in javascript?
Can I open javascript on iphone?
Explain the difference between call() and apply()?
java pgm for reads a file(text file) and removes all the spaces then the text and write this back into the same file. e.g: (Input) _______ chennai is fourth biggest city in india. (output) _______ chennaiisfourthbiggestcityinindia.
What would you use javascript for?
What does e mean in javascript?
What is the use of decodeuri() and encodeuri()?
Can you explain the difference between == and ===?
How to get the last index of a string in javascript?