Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
$.each vs for..of for array
(version: 0)
compare how to quick work with array in cycle
Comparing performance of:
$.each vs for .. of
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js'></script>
Script Preparation code:
var idAndNames = ['1', 'Serge', '2', 'Alex', '3', 'Mary', '4', 'Sasha', '5', 'Max'];
Tests:
$.each
$.each(idAndNames, function (index, value) { console.log("value:" + value);});
for .. of
for (const value of idAndNames) {console.log("value:" + value);}
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
$.each
for .. of
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
$.each vs for cycle for array of object
$.each vs for cycle for array of object 2
JQuery each vs for ... of for array
jQuery Each vs For in
Comments
Confirm delete:
Do you really want to delete benchmark?