> Le 27 juil. 2016 à 07:16, Jordan Harband <ljh...@gmail.com> a écrit : > > `new weirdFunction()` would `=== iter` because a constructor that returns an > object (`this`), returns that object when `new`ed - which is how functions > have worked since ES3 (or probably ES1).
If `weirdFunction` were defined as if by evaluating `function () { return this }`, yes. But in general, functions are not necessarily constructors (just try `new Math.sin` in your favourite JS environment). —Claude _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss