Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4611404
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:15:49+00:00 2026-05-22T01:15:49+00:00

this page states: Note: isPrototypeOf differs from instanceof operator. In the expression object instanceof

  • 0

this page states:

Note: isPrototypeOf differs from
instanceof operator. In the expression
object instanceof AFunction, the
object prototype chain is checked
against AFunction.prototype, not
against AFunction itself

Ok I don’t really get what they are trying to tell us. Isn’t object instanceof AFunction exactly the same as `AFunction.prototype.isPrototypeOf(object)? or am I wrong?

Why do we need the isPrototypeOf at all?

If i ever need to do p.isPrototypeOf(o) couldn’t I just do o instanceof p.constructor ?

Addtionally, is p.isPrototypeOf(o) functionally equivalent to p===Object.getPrototypeOf(o)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:15:49+00:00Added an answer on May 22, 2026 at 1:15 am

    Object constructors are funky things. From this answer:

    As Pointy has pointed out, in his
    answer

    The “constructor” property is a
    reference to the function that created
    the object’s prototype, not the object
    itself.

    The usual way to deal with this is to
    augment the object’s prototype
    constructor property after assigning
    to the prototype.

    An object’s constructor is not read-only, which is why this is possible to do at all. I could assign any value to p.constructor after p is created, and this would completely break using

    o instanceof p.constructor
    

    instead of

    p.isPrototypeOf(o)
    

    Further reading

    • constructor @ MDC
    • What it the significance of the Javascript constructor property?
    • OO Programming in JS
    • Constructors considered mildly confusing

    Edit re: OP edit

    Addtionally, is p.isPrototypeOf(o) functionally equivalent to p===Object.getPrototypeOf(o)?

    Those are more similar than your original question, aside from the fact that Object.getPrototypeOf wasn’t introduced until JavaScript 1.8.1? See John Resig – Object.getPrototypeOf. Perhaps more relevant, the two functions are different in the spec! (warning, PDF link)

    15.2.3.2 Object.getPrototypeOf

    15.2.4.6 Object.prototype.isPrototypeOf

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The T-SQL MSDN page states The timestamp syntax is deprecated. This feature will be
This web page http://www.w3schools.com/ASP/prop_sessionid.asp states that a session ID is generated on the ServerSide.
This page from Adobe says to add a wmode parameter and set its value
I this MSDN Magazine article , the author states (emphasis mine): Note that boxing
I have this query: SELECT p.id, r.status, r.title FROM page AS p INNER JOIN
Note: I have seen this and tried to take as much from it as
This page mentions how to trunc a timestamp to minutes/hours/etc. in Oracle. How would
This page displays beautifully in firefox but i get all kinds of problems when
This page in the Android documentation defines an element id as follows: <TextView android:id=@+id/label
This page indicates that TabPage has a GotFocus event, but in Visual Studio 2008

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.