function foo() {
var b = "Can you access me?";
}
console.log(typeof b === "undefined");
try {
throw new exception("fake exception");
} catch (err) {
var test = "can you see me";
console.log(err instanceof ReferenceError === true);
}
console.log(test === "can you see me")
console.log(typeof err === "undefined")
with ({inScope : "You can't see me"}) {
var notInScope = "but you can see me";
console.log(isScope === "You can't see me");
}
console.log(typeof inScope === "undefined")
console.log(notInScope === "but you can see me");
width (object) {
statement;
}
function doSometing(value, obj) {
width(obj) {
console.log(value);
value = "which scope is this?";
}
}