This file contains 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
# prints 0-9 | |
for x in range(10): | |
print x | |
# prints 1-10 | |
for x in range(1, 11): | |
print x | |
# remember, we don't need to declare variables | |
# we can just assign them |
This file contains 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
// JS array equivalents to C# LINQ methods - by Dan B. | |
// Here's a simple array of "person" objects | |
var people = [ | |
{ name: "John", age: 20 }, | |
{ name: "Mary", age: 35 }, | |
{ name: "Arthur", age: 78 }, | |
{ name: "Mike", age: 27 }, | |
{ name: "Judy", age: 42 }, | |
{ name: "Tim", age: 8 } |
This file contains 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
[diff] | |
indentHeuristic = true | |
submodule = log | |
[color] | |
diff = always | |
interactive = always | |
status = always | |
branch = always | |
[alias] | |
st = status |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |