Exercise 2

In notebook:
FrontEndMasters Functional light
Created at:
2016-09-24
Updated:
2016-09-24
Tags:
Functional Programming JavaScript
  function foo() { /* .. */ }

var x = foo(3,4);

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

  1. Define foo(..) so that it produces a function which remembers only the first two arguments that were passed to foo(..), and always adds them together.