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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:22:09+00:00 2026-06-09T08:22:09+00:00

So I see plenty of JavaScript code out there that uses new when making

  • 0

So I see plenty of JavaScript code out there that uses “new” when making constructors. After reading part of JavaScript the Good Parts it seems that using “new” isn’t the cat’s pajamas. That was 4 years ago though… Is it still not recommended? What is the current standard?

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

    Since when is new not recommended? D. Crockford has a valid point and a strong opinion but new is part of the language and it’s very much being used in many projects. new is part of the prototype inheritance model, and must be used to create new instances with a constructor function. Crockford points out a purely functional approach using the this context appropriately and return this to be able to inherit properties and methods between children objects. It’s a different solution to a common problem, but it doesn’t mean that new shouldn’t be used. In fact, one of the most copy/pasted JS snippets of all times is Crockford’s, the object.create polyfill, and it uses new:

    if (typeof Object.create !== 'function') {
        Object.create = function (o) {
            function F() {}
            F.prototype = o;
            return new F();
        };
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I see there are plenty of web sites out there that will do this,
I see plenty that lead to custom authorization strategies for devise and warden, but
I want to integrate some existing Perl code with ASP.NET. I see plenty examples
I'm currently working on something that is probably done in plenty of examples out
I understand that floating point calculations have accuracy issues and there are plenty of
There are plenty of questions on here that ask 'what ORM should I use
Given that there is a global javascript variable on my web page named myVar,
Background I'm writing an asynchronous comment system for my website, after reading plenty of
Ok I feel really stupid asking this. I see plenty of other questions that
see fiddle Firstly i am new to jquery. i have to make one cell

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.