[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf [Back]  [Original]

Object.prototype.isPrototypeOf() - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Object.prototype.isPrototypeOf()

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 ..

isPrototypeOf() , .

: isPrototypeOf() instanceof. "object instanceof AFunction" , object AFunction.prototype, AFunction.

In this article

prototypeObj.isPrototypeOf(object)

prototypeObj

, object.

object

, .

isPrototypeOf() , .

, :

js
function Fee() {
  // ...
}

function Fi() {
  // ...
}
Fi.prototype = new Fee();

function Fo() {
  // ...
}
Fo.prototype = new Fi();

function Fum() {
  // ...
}
Fum.prototype = new Fo();

Fum , Fi Fum, :

js
var fum = new Fum();
// ...

if (Fi.prototype.isPrototypeOf(fum)) {
  //   - 
}

, instanceof, , , , , , , .

Specification
ECMAScript 2027 LanguageSpecification
# sec-object.prototype.isprototypeof


Web Proxy Viewer  |  New URL  |  Original Page