摘要:
function myDeepClone(o){ const result = new (Object.getPrototypeOf(o)).constructor for(k in o){ if(typeof o[k] 'object' && o[k] !== null){ result[k] = 阅读全文
摘要:
个人练习,代码如下: function myInstanceOf(o,type){ if(typeof o !== 'object' || o null){ return false } if(Object.getPrototypeOf(o) type.prototype){ return true 阅读全文