mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-12 10:51:42 +08:00
存量题库数据更新
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<p>请你编写一个函数,检查给定的对象是否是给定类或超类的实例。</p>
|
||||
<p>请你编写一个函数,检查给定的值是否是给定类或超类的实例。</p>
|
||||
|
||||
<p>可以传递给函数的数据类型没有限制。</p>
|
||||
<p>可以传递给函数的数据类型没有限制。例如,值或类可能是 <code>undefined</code> 。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<strong>解释:</strong>
|
||||
class Animal {};
|
||||
class Dog extends Animal {};
|
||||
checkIfInstance(new Dog(), Animal); // true
|
||||
checkIfInstanceOf(new Dog(), Animal); // true
|
||||
|
||||
Dog 是 Animal 的子类。因此,Dog 对象同时是 Dog 和 Animal 的实例。</pre>
|
||||
|
||||
|
Reference in New Issue
Block a user