Skip to content

Instantly share code, notes, and snippets.

@alanland
Created August 6, 2013 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanland/6161932 to your computer and use it in GitHub Desktop.
Save alanland/6161932 to your computer and use it in GitHub Desktop.
So, you think you know JavaScript?
if (!("a" in window)) {
var a = 1;
}
alert(a);
var a = 1,
b = function a(x) {
x && a(--x);
};
alert(a);
function a(x) {
return x * 2;
}
var a;
alert(a);
function b(x, y, a) {
arguments[2] = 10;
alert(a);
}
b(1, 2, 3);
function a() {
alert(this);
}
a.call(null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment