You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2618-check-if-object-instance-of-class/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
<h2><ahref="https://leetcode.com/problems/check-if-object-instance-of-class/">2618. Check if Object Instance of Class</a></h2><h3>Medium</h3><hr><div><p>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.</p>
1
+
<h2><ahref="https://leetcode.com/problems/check-if-object-instance-of-class/">2618. Check if Object Instance of Class</a></h2><imgsrc="https://img.shields.io/badge/Medium-FECC00"alt="Medium" /><hr><div><p>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.</p>
2
2
3
3
<p>There are no constraints on the data types that can be passed to the function. For example, the value or the class could be <code>undefined</code>.</p>
4
4
@@ -34,4 +34,4 @@ Dog is a subclass of Animal. Therefore, a Dog object is an instance of both Dog
34
34
<strong>Output:</strong> true
35
35
<strong>Explanation: </strong>5 is a Number. Note that the "instanceof" keyword would return false. However, it is still considered an instance of Number because it accesses the Number methods. For example "toFixed()".
0 commit comments