WebFund 2014W Lecture 10

From Soma-notes
Revision as of 18:50, 7 February 2014 by Soma (talk | contribs) (Created page with " ===puzzle.js=== <source line lang="javascript"> y = "Yo"; var f = function(a) { var x = "hello "; var s = {}; s.g = function(b) { return x + b + ", " + a; ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


puzzle.js

y = "Yo";
 
var f = function(a) {
    var x = "hello ";
    var s = {};
 
    s.g = function(b) {
	return x + b + ", " + a;
    }
 
    s.h = function(c) {
	return a = c;
    }
 
    s.j = function(x) {
	return eval(x);
    }
 
    return s;
}
 
var p = f("do I know you?");
 
exports.p = p;