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

  • Home
  • SEARCH
  • 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 6119477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:33:27+00:00 2026-05-23T15:33:27+00:00

I am having a problem identifying a javascript object function A(x, y){ this.boo =

  • 0

I am having a problem identifying a javascript object

function A(x, y){

    this.boo = function(){
    }
}
var aa = new A("1", "2");
aa.boo();

In the code, is ‘aa’ a javascript object? Does it inherit properties from object.prototype too? If yes, how can I be sure (from a novice).

  • 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-23T15:33:28+00:00Added an answer on May 23, 2026 at 3:33 pm

    You can be sure because every native object inherits from Object.prototype (except for the Global object, whose [[Prototpye]] is implementation dependant, but it is an instance of Object in most browsers).

    Edit

    Some clarifications.

    Native objects are those constructed using ECMAScript, e.g.

    function foo() {}
    var obj = {};
    var arr = [];
    

    and so on. They all have Object.prototype on their [[Prototype]] chain, which makes them instances of Object (and whatever other constructor’s prototype is on the chain). An ECMAScript object can inherit from more than one prototype and hence be an instance of more than one object:

    function Foo(){}
    Foo instanceof Function; // true
    Foo instanceof Object;   // true
    
    var foo = new Foo();
    foo instanceof Foo;     //true
    foo instanceof Object;  //true
    

    Built–in objects are those supplied by ECMAScript, e.g.

    Global   instanceof Object; // might be true
    Array    instanceof Object; // true
    Math     instanceof Object; // true
    Object   instanceof Object; // true - Object is an Object :-)
    Date     instanceof Object; // true
    Function instanceof Object; // true
    

    and so on. Most of the above are also instances of Function (including Function).

    Host objects are those supplied by the host environment, such as everything in the DOM, e.g.

    document
    document.createElement
    window
    var element = document.createElement('img');
    var nodeList = element.getElementsByTagName();
    

    and so on. These object only have to follow the most basic rules of ECMAScript, they don’t need to have any inheritance model and may even throw errors when simply tested with instanceof or typeof operators (which is a nasty behaviour but some versions of some browsers do – many IE host objects implemented as ActiveX controls do, hence their creation within try..catch blocks).

    Read the section on “Native ECMAScript Objects” (ES 3) and “Standard Built-in ECMAScript Objects” (ES 5) objects in the specification (ECMA–262), it’s all there.

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

Sidebar

Related Questions

Having problem with this bit of code qith jQuery. it should pick the values
i having problem in converting this C# code into VB.net. The loadLecturer seem to
I'm having some trouble identifying the problem with my html code. I've created a
Having problem to open form in new window, script is pulled from external service.
I'm having problem selecting an element with an id like this <li =0f:Bactidol_Recorder.mp4>. I
I'm having problem restricting a query in mdx, using except function at where clause.
I having problem to update the counter (integer value). this is the definitions of
I having problem with append() when the textbox is focus the second time. var
Hi i am having problem inserting data into multiple table from one view. First
I'm having a difficultly identifying the solution to a problem with strange onClick behaviour

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.