==>
1 function instanceOf(inst, clz) { 2 const prototype = clz.prototype; 3 let proto = inst.__proto__; 4 while (proto !== null) { 5 if (proto === prototype) return true; 6 proto = proto.__proto__; 7 } 8 9 return false; 10 }