yurko
7/17/2015 - 8:29 AM

no new before constructor

no new before constructor

function MyConstructor(foo){
  if (!(this instanceof MyConstructor)){
    return new MyConstructor(foo);
  }
  this.foo = foo;
  return this;
}