Javascript – Is there a static version of `instanceof`?
Is there a static equivalent of instanceof? I.E., rather than: obj1 instanceof Type something like: TypeA instanceof TypeB? I couldn't find anything on the matter, so I hacked together this: function InstanceOf(type,parent) { do{ if(type === parent) return true;} while(type…