| <p>This page tests var declarations inside various block structures and control statements.</pre> |
| document.getElementById("console").appendChild(document.createTextNode(s + "\n")); |
| log("PASS: " + a + " should be " + b + " and is."); |
| log("FAIL: " + a + " should be " + b + " but instead is " + evalA + "."); |
| function testDeclarations(title) |
| for (var i = 0; i < vars.length; ++i) |
| shouldBe("'" + vars[i] + "' in window", true); |
| testDeclarations("Before executing blocks containing var declarations: "); |
| for (var i = 0; i < 0; ++i) { |
| testDeclarations("After executing blocks containing var declarations: "); |