Variable outside function scope

Benchmark created by Chester on


Preparation HTML

<script>
var i = 1;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Re declared
function test(j) {
  return j + 1
}

test(1);
ready
Pre declared
function test() {
  return i + 1
}

test();
ready

Revisions

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