Created
April 27, 2012 14:34
-
-
Save dsimard/2509740 to your computer and use it in GitHub Desktop.
Space 80
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
program HelloWorld; | |
begin | |
if 1 = 1 then | |
begin | |
writeln('Hello World'); | |
end | |
else | |
begin | |
writeln('We are in Sonic the Hedgehog''s Twilight Zone'); | |
end; | |
end. |
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
// Long hard to read chain | |
$("#theButton").css("border", "solid 10px red").text("click here to do nothing").click(function() { | |
// do nothing | |
}); | |
// Shorter easier to read | |
$("#theButton") | |
.css("border", "solid 10px red") | |
.text("click here to do nothing") | |
.click(function() { | |
// do nothing | |
}); |
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
function lotOfArguments(argument1, argument2, argument3, argument4, | |
argument5, argument6, argument7, argument8) |
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 bool = true; | |
// 3 lines if | |
if (bool) { | |
window.alert("This is true"); | |
} | |
// one-liner if | |
if (bool) {window.alert("this is true");} |
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
function lotOfArguments(argument1, argument2, options) | |
// Call the function | |
lotOfArguments("Lorem", "Ipsum", | |
{ argument4 : "sit", | |
argument7 : "adipiscing" } | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment