This test should ensure that it is MyObjectalways used as a constructor, namely:
var instance = new MyObject();
and never
var instance = MyObject();
leading to undesired code behavior.
- var instance = MyObject();, this (Window) instanceof check .
, . , , .