^diff.+$
-- Highlight Text (Whatever Background)^diff.+$
-- Highlight Text (Whatever Foreground)uninitialized\sconstant\s([\w:]+)
-- Highlight Text (White on Red)undefined\slocal\svariable\sor\smethod\s
(.+)'` -- Highlight Text (White on Red)undefined\smethod\s
(.+)'` -- Highlight Text (White on Red)no\simplicit\sconversion\sof\s(\w+)\sinto\s(\w+)
-- Highlight Text (White on Red)\
?(.+)?'?:?\swrong\snumber\sof\sarguments\s` -- Highlight Text (White on Red)\(\d+\sfor\s\d[\.\+\d]?\)
-- Highlight Text (Red on White)
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
var person = { | |
firstName: "Bob", | |
lastName: "Ject", | |
age: 33, | |
address: { | |
street: "123 Memory Ln", | |
apt: "0x7fff9575c05f", | |
zip: "01101", | |
city: "Browser Town", | |
state: "Mozilla" |
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
var foo = 5; | |
var bar = 10; | |
function logFoo() { | |
foo = 15; | |
var bar = 20; | |
console.log("logFoo scope") | |
console.log(foo, bar); | |
} |
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
function someFunction() { | |
console.log(this); | |
} | |
someFunction(); // window |
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
var tellSecrets = function() { | |
var secret = "shh, don’t tell anyone"; | |
return function() { | |
console.log(secret); | |
}; | |
}(); | |
tellSecrets(); | |
console.log(secret); // undefined |
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
var greeterCreator = function(greeting) { | |
return function(name) { | |
console.log(greeting + " " + name); | |
}; | |
}; | |
var helloGreeter = greeterCreator("Hello"); | |
helloGreeter("Chicago Web Conf"); |
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
var myFunction = function() { | |
console.log("Hello World"); | |
}; | |
myFunction.someProperty = "WTF!? a function with a property?"; | |
console.log(myFunction.someProperty); |
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
var myFunction = function() { | |
console.log("Hello World"); | |
}; | |
var callAnotherFunction = function(anotherFunction) { | |
anotherFunction(); | |
}; | |
callAnotherFunction(myFunction); // logs "Hello World" |
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
var myFunction = function() { | |
console.log("Hello World"); | |
}; | |
var myObject = { | |
myMethod: function() { | |
console.log("I'm a property of an object"); | |
} | |
}; |
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
/* jshint esnext: true */ | |
var _ = require("lodash"); | |
App.createController("Friends", { | |
actions: ["index"], | |
all: function() { | |
this.cacheElements(); | |
this.registerEvents(); | |
}, |