javascript - advanced parameter usage -


  // This is a function that is added every time a new item is added or // list is sorted is . Var showNewOrder = function () {// This function means that we serialize () us the text of each // element instead of our ID, which is the default return. Var serializeFunction = function (el) {return el.get ('text'); }; // We pass our custom function to serialize (); Var orderTxt = sort.serialize (serializeFunction); // And then we add that text to our page so that everyone can see it. $ ('Data') Set ('text', orderTxt.join ('')); };  

is a complete code

  var serializeFunction = function (* el *) {return el.get ('text'); }; Var orderTxt = sort.serialize (serializeFunction * (el) *);  

Compare the code

Is B Passed or Not? What is happening ???

I want to learn how to use advanced parameters.

Function names ("parameter1, parameter2, parameter3 ...)" do not declare tasks like. If there are no calling functions like "name (parameter1, parameter2, parameter3 ...)" if parameter variables are not there.

By declaring functions like functions (parameter1, parameter2, parameter3 ...). If the calling function like "variable (parameter1, parameter2, parameter3 ...)" is parameter object i

I am interested.

You probably have a bookmark with those lessons in which I am interested ... please, share !!!

The value assigned to "SerializeFunction" is actually an anonymous function, you can see it as indicator

or a function," L "is only a declared input parameter that will be used when that function is called.

Considering the one posted, the sort.serialize function gets the job as only a parameter, the "serialization function" is not being invented, it Only passed as an argument.

Therefore, the chain function which receives the function passed as a parameter will be in charge of performing it internally.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -