Last active
December 12, 2015 08:58
-
-
Save brookemckim/4747436 to your computer and use it in GitHub Desktop.
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() { | |
var Drop = window.Drop = function() { | |
var files = []; | |
var add = function(word) { | |
files.push(word); | |
return files; | |
} | |
return { | |
files: files, | |
add: add | |
} | |
} | |
})() | |
// All of these seem to be the same? | |
var a = Drop(); | |
var b = new Drop(); | |
var c = new Drop; | |
// Each has their own state which is what I want. | |
a.add("file1"); | |
b.add("file2"); | |
c.add("file3"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment