Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
Chrome 76
Mac OS X 10.14.2
Desktop
5 years ago
Test name Executions per second
_.join 2808284.2 Ops/sec
array.join 4904262.0 Ops/sec
HTML Preparation code:
AخA
 
1
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
 
var elements = ["cat", "dog", "bat"]
Tests:
  • _.join

     
    _.join(elements, ' ,')
  • array.join

     
    elements.join(' ,')