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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:44:19+00:00 2026-05-23T07:44:19+00:00

How do prototypes objects constructors this functions work in JS in relation to each

  • 0

How do

  • prototypes
  • objects
  • constructors
  • “this”
  • functions

work in JS in relation to each other (and what exactly are they; is a constructor a function, object, prototype, “this”)?

Can someone please clarify this? I have an idea of what each of them are and how they work, but not a clear one.

I think it would be easier to understand questions that arise, like, for example: “Is a.constructor the same as a.prototype.constructor“, if one knows what these things are.

  • 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-23T07:44:19+00:00Added an answer on May 23, 2026 at 7:44 am

    Object – A collection of name-value pairs, for example:

    var someObject = {
        aName: "aValue",
        name2: "value2"
    }
    

    Constructor – a function that ‘creates’ an object, for example:

    function someObject(someParam) {
        this.someParam = someParam;
        this.getSomeParam = function() {
             return this.someParam;
        }
    }
    

    Prototype – a special type of object, from which other objects inherit properties. Every object has a prototype. You can use them to add a method to all instances of an object, for example:

    String.prototype.doSomething = function() {
        //Do something with a String
    }
    

    Now that you have defined a doSomething method on the String prototype, all String objects can use it:

    var myString = "Hello";
    myString.doSomething();
    

    For more information about the JavaScript language and how it works, I suggest you take a look at the ECMAScript spec, or for something a bit lighter, read this.

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

Sidebar

Related Questions

Say I have two constructors: A = function () { this.x = 'x'; };
I know that the prototype property of JavaScript function objects is copied to the
I have two objects, and one inherites from the other. the parent object sends
stated here https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function the constructor property of an instance of a function object specifies
I would like to create function objects (yes, all functions are objects) with some
For exampleis this: function obj(val) { this.val = val; } obj.prototype.newfunction = function(){ return
In Prototype I can show a loading... image with this code: var myAjax =
This code is from Prototype.js . I've looked at probably 20 different tutorials, and
I am trying to get a JavaScript object to use the this assignments of
In Javascript, every object has a prototype. Any prototype is an object, therefore any

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.