What's fn(data) mean?


In 10.2.2


function(fn),this fn is a parameter.
but what’s fn(data)mean?it equals what?
thanks for anwsering this question.


I think this gets answered a bit further on, but since I was just working through this thought I’d take a stab at an answer. In formhandler.js on page 219, you add the fn as a callback function to the addSubmitHandler prototype.

In main.js, you actually setup addSubmitHandler to use the following as fn:

So, when fn(data) is called it’s actually sending back the serialized data to the createOrder function as: myTruck.createOrder(data)

Does that help?