let listArray = [1,2] let typeObj = Array const deepFun = (list,type) => { if(list.__proto__===type.prototype) { return true } else { deepFun(list.__proto__,type) } } deepFun(listArray,typeObj)