const myInstanceof = (target,obj) =>{ let t = target; while(t){ if(t === obj.prototype){ return true; } t = t.__proto__; } return false; } console.log(myInstanceof([1,2,3],Array))