摘要: ``` var json = {a:6,b:4,c:[1,2,3]}; var json2 = clone(json); function clone(obj){ var oNew = new obj.constructor(obj.valueOf()); if(obj.constructor == Object){ for(var... 阅读全文
posted @ 2019-02-27 18:01 FE-神鸟 阅读(208) 评论(0) 推荐(0) 编辑
摘要: ``` var arr = [1,2,3,1,43,12,12,1]; var json = {}; var arr2 = []; for (var i = 0; i 阅读全文
posted @ 2019-02-27 17:46 FE-神鸟 阅读(449) 评论(0) 推荐(0) 编辑
摘要: ``` var str = 'asdfssaaasasasasaa'; var json = {}; for (var i = 0; i iMax){ iMax = json[i]; iIndex = i; } } alert('出现次数最多的是:'+iIndex+'出现'+iMax+'次'); ``` 阅读全文
posted @ 2019-02-27 16:46 FE-神鸟 阅读(1247) 评论(0) 推荐(0) 编辑