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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
<!-- | |
1. Change the addEventListener calls so that the events occur in the following order. | |
the_div! the_item! the_list! | |
A - true, false, true | |
2. Change the addEventListener calls so that the events occur in the following order. | |
the_item! the_list! the_div! | |
A - false, false, true |
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
//Step 1 | |
var Person = function (name) { | |
this.name = name; | |
} | |
var thomas = new Person('Thomas'); |
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.prototype.cached = function(){ | |
var cacheResults = {}; | |
var myFunct = this; | |
return function(x) { | |
if(typeof cacheResults[x] === "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 logCar = function (data) { | |
console.log("I'm a " + data.color + " " + data.make); | |
} | |
// Example call for functional version: | |
logCar({ color: 'blue', make: 'BMW' }); | |
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 someFunc = (function() { | |
var index; | |
function log(){ | |
console.log(index); | |
} | |
function iterate(){ | |
log(); |