ga-wdi-boston / js-functions-ins-and-outs

JavaScript Function Arguments and Return Values.
Other
2 stars 174 forks source link

Code along example is broken #48

Closed MicFin closed 7 years ago

MicFin commented 7 years ago

This example may be incorrect to show error and then fix but it is not clear. https://github.com/ga-wdi-boston/js-functions-ins-and-outs#code-along---return-new-functions

- const memoFactory = function (memo) {
+ const memoFactory = function () {
  let total = 0

-  return function () {
+  return function (memo) {
    total+= 1
    return total + ": " + memo
  }
}
jrhorn424 commented 7 years ago

Closing, since I accidentally provided more detail over in #49