Test name | Executions per second |
---|---|
includes | 7318347.5 Ops/sec |
has | 8008371.0 Ops/sec |
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
var array = ['banana', 'sausage', 'jesus']
_.includes(array, 'sausage')
_.has(array, 'sausage')