for loop vs map

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
for loop
let demo = [];
for (let i = 0; i < 10; i++) {
	demo[i] = "x"
}
ready
map
let demo = [];
demo.map(el => el = "x" )
ready

Revisions

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