摘要:
function deepClone(origin, target){ var target = target || {}, toStr = Object.prototype.toString, arrStr = "[object Array]"; for(var prop in origin){ if(origin.hasOwnProperty(... 阅读全文
摘要:
Array.prototype.unique = function (){ var temp = {}, arr = [], len = this.length; for(var i = 0; i < len; i++){ if(!temp[this[i]]){ temp[this[i]] = 'abc'; ... 阅读全文
摘要:
arr为包含对象的数组,取出的obj是数组arr中一个id为3的对象 阅读全文