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 6086231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:43:42+00:00 2026-05-23T11:43:42+00:00

From the javascript console in Chrome: > function Person(name){this.name=name;} undefined At this point, Person.prototype

  • 0

From the javascript console in Chrome:

> function Person(name){this.name=name;}
undefined

At this point, Person.prototype should be an empty Object according to the Javascript specs.
Let’s assign it:

> p=Person.prototype
  > Person

Note that that > Person is clickable and it expands to:

constructor: function Person(name){this.name=name;}
__proto__: Object

But… wasn’t it meant to be an empty object? What is all the extra stuff?
If you do an alert:

alert(p)

You get [object Object]. Why, when you type it in the Chrome console, does it come out with > Person which expands? Wasn’t it meant to be an empty object?

Thank you!

  • 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-23T11:43:43+00:00Added an answer on May 23, 2026 at 11:43 am

    No, the prototype always has the constructor property which points to the function it is the prototype of. And of course it inherits from an object too, that is the internal __proto__ property.

    It is defined in ECMAScript 5 Section 13.2, Creating Function Objects:

    (…)

    16. Let proto be the result of creating a new object as would be constructed by the expression new Object() where Object is the standard built-in constructor with that name.

    17. Call the [[DefineOwnProperty]] internal method of proto with arguments "constructor", Property Descriptor {[[Value]]: F, { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}, and false.

    18. Call the [[DefineOwnProperty]] internal method of F with arguments "prototype", Property Descriptor {[[Value]]: proto, { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: false}, and false.

    (…)

    This means nothing else than:

    Create a new empty object called proto (16). Define the property constructor on that object and set the value to F (the function itself) (17). Then define the property prototype on the function F and set its value to proto.


    If you alert an object, then the object is converted to a string. The default behaviour is to convert an object to the [object Object] string, unless the "special" toString method is overridden.

    The Chrome console lists these properties because it is meant for debugging, so you need information. [object Object] is not very informative.

    FWIW, an empty object looks like this:

    empty object

    You can also see the internal __proto__ property here. An empty object always inherits some default properties, but it does not have own properties.

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

Sidebar

Related Questions

I have javascript object defined like this: function SocialMiner() { var verbose=true; var profileArray=new
Getting that error in my javascript console(in Chrome) with a collada object I'm attempting
Excerpt from my JavaScript console: > 0 in [1, 2] true Why?
Is it possible to pass a function/callback from javascript to a java applet? For
How do you save JavaScript console output in Chrome across page loads? The output
I've got a JavaScript object similar to this: var profile1 = { one: "1",
Some Context From Javascript: The Definitive Guide : When regexp is a global regular
From another answer on Stackoverflow is a conversion from Javascript date to .net DateTime:
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
I need to pass an array from JavaScript to a page method in C#.

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.