Skip to content

Instantly share code, notes, and snippets.

@nhunzaker
Last active August 29, 2015 13:59
Show Gist options
  • Save nhunzaker/10939618 to your computer and use it in GitHub Desktop.
Save nhunzaker/10939618 to your computer and use it in GitHub Desktop.
const DREAMLAND = true;
function halp() {
if (DREAMLAND) {
let santa = "I do exist"
}
console.log(typeof santa) // => undefined
}
$traceurRuntime.ModuleStore.getAnonymousModule(function() {
"use strict";
var DREAMLAND = true;
function halp() {
if (DREAMLAND) {
try {
throw undefined;
} catch (santa) {
santa = "I do exist";
}
}
console.log((typeof santa === 'undefined' ? 'undefined' : $traceurRuntime.typeof(santa)));
}
return {};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment