转自:http://www.cnblogs.com/darrenji/p/5011241.html
-[forEach]
<code>
let aa = ['ab','bc','cd'];
_.forEach(aa, function(name,index){
console.log(name+":"+index);});
结果:ab:0 bc:1 cd:2
</code>
-[sortBy]
<code>
var strSortResult = _.sortBy('cda').join(' ');console.log(strSortResult);
结果:a c d
</code>
网友评论