Write a function that checks if a given value is an instance of a given class or superclass. For this problem, an object is considered an instance of a given class if that object has access to that class's methods.
There are no constraints on the data types that can be passed to the function. For example, the value or the class could be undefined.
value is any valid JavaScript valueclassFunction is any valid JavaScript valuefunc = () => checkIfInstanceOf(new Date(), Date)truefunc = () => { class Animal {}; class Dog extends Animal {}; return checkIfInstanceOf(new Dog(), Animal); }truefunc = () => checkIfInstanceOf(Date, Date)falsefunc = () => checkIfInstanceOf(5, Number)true