编辑代码

function _instanceof(l, r) {
    l = l.__proto__;
    var O = r.prototype;

    while (true) {
        if (l == null) {
            return false;
        }

        if (l === O) {
            return true;
        }

        l = l.__proto__;
    }
}