http://ejohn.org/blog/building-a-javascript-library/
In the above link John Resig Suggests calling and returning new foo in a constructor if the caller originally forgot to.
that makes some sense to me, but then I get a strict error because my constructor does not 'always' return a value. Upon gaining a little understanding of constructors in javascript, i stopped returning this because new automatically does that.
My question is, should I ...
- Not use the defensive technique described?
- return this at the end of my constructor?
- Mystery option that I am ignorant of?