Difficulty: 5/10static methods, prototype inheritance, this bindingWithin a class, you can define methods, which are functions associated with the class and its instances. These methods are sometimes referred to as 'class methods.'javascriptCopyScenario Questions0-2 years experience1We have a User class with a method called fetchData. When we pass user.fetchData as an event listener callback, it throws an error saying 'cannot read property of undefined (reading this)'. How would you fix this, and why does it happen?2Imagine you are building a utility class for mathematical operations. You want to call a helper method like MathUtils.clamp(val, min, max) without having to instantiate the class with the 'new' keyword. How would you define that method in JavaScript, and what happens if you try to access 'this' inside it?Follow-up QuestionsHow does using an arrow function as a class property affect memory usage when instantiating thousands of objects?If you transpile ES6 classes to ES5, what does a static method actually look like under the hood?How would you mock a static class method in a Jest unit test without affecting other tests?Suggest Improvement