instanceof读解

function instance(l,r){

   let 0 = r.prototype;

   let v = l.__proto__;

   while(true){

       if(v === null){

            return false;

      }

      if(v === 0){

           return true;

     }

     v = l.__proto__;

   }

}

posted @ 2019-10-30 16:43  灏月天染  阅读(147)  评论(0编辑  收藏  举报