Created
December 30, 2010 19:17
-
-
Save qwertypants/760164 to your computer and use it in GitHub Desktop.
A simple test to see if your JS and jQuery skills are up to date. Adapted from and inspired by http://bit.ly/fSuTDx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = 1, | |
b = function a(x) { | |
x && a(--x); | |
}; | |
alert(a); | |
--------------------------------------- | |
function b(x, y, a) { | |
arguments[2] = 10; | |
alert(a); | |
} | |
b(1, 2, 3); | |
--------------------------------------- | |
var a = "hello"; | |
(function(){ | |
var a = "good bye"; | |
})(); | |
alert(a); | |
What's the difference? | |
~~~~~~~~~~~~~~~~~~~~~~ | |
jQuery(function($){ | |
alert("Hello World"); | |
}); | |
$(document).ready(function(){ | |
alert("Hello World"); | |
}); | |
jQuery(function($){ | |
alert("Hello World"); | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment