Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36
Chrome 96
Linux
Desktop
2 years ago
Test name Executions per second
_.every 3183077.0 Ops/sec
elements.every 10446395.0 Ops/sec
HTML Preparation code:
AخA
 
1
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.core.js"></script>
Script Preparation code:
 
var elements = ["cat", "dog", "bat"]
Tests:
  • _.every

     
    _.every(elements, el => el.length == 3)
  • elements.every

     
    elements.every(el => el.length == 3)