Skip to content

Instantly share code, notes, and snippets.

@qwertypants
Created December 30, 2010 19:17
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 qwertypants/760164 to your computer and use it in GitHub Desktop.
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
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