Skip to content

Commit 3fd1795

Browse files
committed
Changed the way innerVariable is shown to be undefined. try/catch hasn't been introduced yet, but testing the type has already been demonstrated previously.
1 parent fc45a9b commit 3fd1795

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

topics/about_scope.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,5 @@ test("variables declared inside of a function", function() {
1818
})();
1919

2020
equals(outerVariable, __, 'is outerVariable defined in this scope?');
21-
var isInnerVariableDefined = true;
22-
try {
23-
innerVariable
24-
} catch(e) {
25-
isInnerVariableDefined = false;
26-
}
27-
equals(isInnerVariableDefined, __, 'is innerVariable defined in this scope?');
21+
equals(typeof(innerVariable), "undefined", 'is innerVariable defined in this scope?');
2822
});

0 commit comments

Comments
 (0)