(function () {
{ function g() { return 1; } }
assert.sameValue(typeof g, "function", "block function is var-hoisted");
assert.sameValue(g(), 1, "block function is callable after the block");
})();
(function () {
if (true) { function h() { return 5; } }
assert.sameValue(typeof h, "function", "function in an if-block");
assert.sameValue(h(), 5);
})();
(function () {
{ { function deep() { return 9; } } }
assert.sameValue(typeof deep, "function", "deeply nested block function");
})();
(function () {
function f() { return "outer"; }
{ function f() { return "inner"; } }
assert.sameValue(f(), "inner", "block declaration overrides the outer one");
})();
(function () {
for (var i = 0; i < 1; i++) { function looped() { return "L"; } }
assert.sameValue(typeof looped, "function", "function in a loop body");
})();
(function () {
assert.sameValue(early(), "hoisted", "top-level hoisting");
function early() { return "hoisted"; }
})();