It looks like you're reporting a documentation bug. Can you open an issue for that?
-N On Sat, Feb 14, 2015 at 9:33 PM, Adam Bankin <[email protected]> wrote: > "Calling constructors with the new keyword, without assigning the > resulting object to a variable does *is equivalent* to simply calling the > constructor without the new keyword. Thus, the constructor can be avoided > and the function can be called directly." > > It is not "equivalent". Calling the constructor with `new` sets the `this` > inside the constructor to an instance of the constructor itself. Without ` > new` it just calls it as a function setting the `this` to the calling > scope. > > Example: > http://jsbin.com/pahegipowa/1/edit?js,console > > -- > You received this message because you are subscribed to the Google Groups > "ESLint" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- ______________________________ Nicholas C. Zakas @slicknet Author, Professional JavaScript for Web Developers Buy it at Amazon.com: http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3 -- You received this message because you are subscribed to the Google Groups "ESLint" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
