Test name | Executions per second |
---|---|
lodash foreach | 134135.6 Ops/sec |
native with forEach | 178796.6 Ops/sec |
<script src="https://cdn.jsdelivr.net/lodash/4.16.0/lodash.min.js"></script>
var value = {a: 30310, b: '100303', c: '3040494'}
_.forEach(value, function(key){ console.log(key); });
var arr = []
Object.keys(value).forEach( function(key){ console.log(key); } )