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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:12:35+00:00 2026-06-09T02:12:35+00:00

There seems to be quite a few techniques out there for creating client side

  • 0

There seems to be quite a few techniques out there for creating client side objects. What I find really confusing is determining what each technique is called. I’ve used prototype before

MyObject.prototype.someMethod = function (e, a) {
      .....
};

But I’ve also seen objects created in different like this

MyObject.someMethod = function () {
      ....
}

What is the second techinque called and why would one use one over the other?

  • 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-09T02:12:36+00:00Added an answer on June 9, 2026 at 2:12 am

    The first example is analogues to defining methods on a class. Every instance of the class uses the same code; this in such a method points to the instance on which the method was invoked.

    The second is analogous to defining a static method on a class. You invoke the method like

    MyObject.someMethod();

    It doesn’t make sense to invoke the method on an instance.

    I guess you could call the first “prototype methods” and the second “constructor/class methods”.

    If you are comfortable using classical OO terminology when talking about javascript, which is somewhat awkward as Javascript uses prototypal inheritance, you can call the the first “instance methods” and the second “static methods”.

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

Sidebar

Related Questions

There seems to a quite a few grid computing frameworks out there, but which
There are quite a few resources for programmatically creating .lnk type shortcuts to files
There seems to be quite a bit of folklore knowledge floating about in restricted
Atomikos is quite verbose when used. There seems to be lots of INFO messages
I have made a quite few genetic algorithms; they work (they find a reasonable
I know there are quite a few questions on this already and i've looked
From this MSDN article , there's quite a few ways to hook up a
There are quite a few classes that extend java.io.Writer and java.io.Reader. Are there circumstances
While there is quite a few questions about copy constructors/assignment operators on SO already,
Update 18th December 2012 Since this question seems to be getting quite a few

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.