Skip to content

Instantly share code, notes, and snippets.

@bishopgrutty
bishopgrutty / LICENSE.txt
Created August 16, 2011 02:17 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
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
<!--
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
//Step 1
var Person = function (name) {
this.name = name;
}
var thomas = new Person('Thomas');
Function.prototype.cached = function(){
var cacheResults = {};
var myFunct = this;
return function(x) {
if(typeof cacheResults[x] === "undefined") {
var logCar = function (data) {
console.log("I'm a " + data.color + " " + data.make);
}
// Example call for functional version:
logCar({ color: 'blue', make: 'BMW' });
var someFunc = (function() {
var index;
function log(){
console.log(index);
}
function iterate(){
log();