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
window.test = { | |
a: 1, | |
b: 2 | |
} |
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 add(x) { | |
// here's where it all starts, at the edge: add(x) | |
var sum = x; | |
// this is where the funk gets in: we're building a function that adds to | |
// the above sum and also provides a method to get to that sum, allowing | |
// to call the function arbitrarily often but also get to the sum, | |
// eventually. As in add(1)(2)(3)(4)(5).get() | |
var result = function(x) { |