It's just to make sure it will work even if F is called without new.
When you call F with new, in that function this is the new instance.
Then, if this is not an instance of F (!(this instanceof F)), then that means that F was not called using new. In this case, F calls itself, now with new.