http://www.2ality.com/2013/07/defending-constructors.html
Seriously though the snippet for the forgetting-new protection in a constructor seems quite handy. It's always good to hear arguments from both sides of the fence.
> typeof String('abc') 'string' > typeof new String('abc') 'object'
Seriously though the snippet for the forgetting-new protection in a constructor seems quite handy. It's always good to hear arguments from both sides of the fence.