Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Constructor in JavaScript

Is there exist a function which is not a constructor in JavaScript. I.e. the following line will be cause TypeError:

var a= new foo(); //foo is not a constructor

In the other words I would like to know the following:

Is there exist a function that has no [[Construct]] internal property?

Answer*

Draft saved
Draft discarded
Cancel
1
  • +1: Not sure why the -1, this seems to be correct to me. OP asked for any function without constructor – there you have it. Commented Jun 9, 2014 at 9:52

lang-js

AltStyle によって変換されたページ (->オリジナル) /