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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:40:53+00:00 2026-06-03T03:40:53+00:00

Here is a jsFiddle of my question: http://jsfiddle.net/4wyvv/1/ Basically: //constructor function function Maker(){ var

  • 0

Here is a jsFiddle of my question: http://jsfiddle.net/4wyvv/1/

Basically:

//constructor function
function Maker(){
    var str;

    this.init = function(str){
        this.str = str;
    };

    this.msg = function(){
        return this.str;
    };
}

//object from Maker
var obj = new Maker();

obj.init("Hi my name is Dan");

//make sure everything exists and has worked as expected
Audit.Log(obj.msg());
//look in Maker.prototype for the constructor property
Audit.Log(obj.constructor);
//look in Maker.prototype for the constructor property
Audit.Log(Maker.prototype.constructor);

//now look for all makers prototype properties, this should list atleast "constructor"
for(var i in Maker.prototype){
    Audit.Log(i);
}

Why does the foreach loop not put out anything? It should at least put out constructor as I showed that Maker.prototype.constructor exists.

  • 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-06-03T03:40:54+00:00Added an answer on June 3, 2026 at 3:40 am

    Some properties of object like “constructor” are hidden or to be more precise non-enumerable so they are not enumerated using a for in loop like this, In ECMA5 we have a method that can get all the properties

    Object.getOwnPropertyNames(Maker.prototype)
    

    this is give you

    ["constructor"]
    

    Here is a detailed explanation : How to display all methods of an object in Javascript?

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

Sidebar

Related Questions

You can see the example here: http://jsfiddle.net/8EHED/8/ This is a tricky problem because I
Here is the scrollbar class in question: http://jsfiddle.net/brandondurham/6SUyM/3/ Currently the height of the scroll
http://jsfiddle.net/motocomdigital/7fyvn/1/ Hello, this is a question I'm really struggling to find an answer for.
Got stuck here: http://jsfiddle.net/UFkg8/ Right now the animation is top-down. What do I need
I have a fiddle here http://jsfiddle.net/WULsZ/1/ I load jQuery first and the code is
Please see the demo here: http://jsfiddle.net/Freewind/Vkp4U/ The html: <div class=outer> <div class=x>x</div> <div class=y>y</div>
take a look at the JsFiddle here: http://jsfiddle.net/ru2Fg/2/ Essentially, it starts with two textarea
I have a CSS mouseover slider fully functional here http://jsfiddle.net/gU4sw/13/ . When I add
I have a pure CSS mouseover slider fully functional here http://jsfiddle.net/gU4sw/13/ . When I
In my jsfiddle, here: http://jsfiddle.net/SJFjK/4/ It is supposed to display a scrollbar for my

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.