Exercise 2 Solution

In notebook:
FrontEndMasters Functional light
Created at:
2016-09-24
Updated:
2016-09-24
Tags:
Functional Programming JavaScript
As simple as this (not using the arguments array)
  function foo(x,y) {
	return function() {
		return x + y;
	}
}

var x = foo(3,4);

x();	// 7
x();	// 7