考虑以下 JavaScript 代码:
if (oo instanceof MyType) {
var newObj = new oo.constructor;
// suppose the following check should be ok but it is not
// newObj should have same constructor as its original oo.
if (newObj instanceof MyType) {
// do something
}
}
我无法达到“做某事”。怎么了?