for loops

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
for in
var test = {
one : 'one',
two : 'two',
three : 'three'
};

for (var i in test) {
  console.log(test[i]);
}
ready
for i
var test = ['one', 'two', 'three'];

for (var i, len = test.length; i < len; i++) {
  console.log(test[i]);
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.